Hallo liebe Community.
Ich wollte mal fragen wie es möglich ist das wenn man ein Spectatet das es flüssig abläuft & nicht die ganze zeit hakt.
Danke aufjedenfall mal im Voraus.
Hier ist der Code falls ihr denn Braucht:
if(strcmp(cmd, "/tv", true) == 0 || strcmp(cmd, "/recon", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pSupporter] > 0) { if(WatchingTV[playerid] < 1) { GetPlayerPos(playerid, Unspec[playerid][Coords][0],Unspec[playerid][Coords][1],Unspec[playerid][Coords][2]); } } if(Spectate[playerid] == 255 && PlayerInfo[playerid][pLocal] != 255 || Spectate[playerid] == 255 && PlayerInfo[playerid][pAdmin] > 0) { GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]); Unspec[playerid][sPint] = PlayerInfo[playerid][pInt]; Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal]; PlayerInfo[playerid][pLocal] = 255; gTeam[playerid] = 0; } tmp = strtok(cmdtext, idx); if(strcmp("off", tmp, true, strlen(tmp)) == 0) { if(WatchingTV[playerid] > 0) { WatchingTV[playerid] = 0; Spectate[playerid] = 253; GameTextForPlayer(playerid, "~w~ TV~n~~r~ Aus", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "Nutze /tv [playerid] um jemand zu beobachten!"); return 1; } } if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pSupporter] > 0) { giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { Spectate[playerid] = giveplayerid; new Float:health; GetPlayerHealth(Spectate[playerid], health); GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer)); new cash = GetPlayerMoney(Spectate[playerid]); if (PlayerInfo[playerid][pAdmin] >= 1) { format(string, sizeof(string), "Recon: (%d) %s $%d H:%.0f",Spectate[playerid],giveplayer,cash,health); } else { format(string, sizeof(string), "UAV: (%d) %s",Spectate[playerid],giveplayer); } SendClientMessage(playerid, COLOR_GREEN, string); WatchingTV[playerid] = 1; } } else { SendClientMessage(playerid, COLOR_GREEN, "Diesen Spieler kannst du nicht Tv´n."); } } else { SendClientMessage(playerid, COLOR_GREEN, "Bist du etwa Admin? Nein also kannst du auch nicht tv´n!"); return 1; } } return 1; }
Mit freundlichem Gruß