Habs raus war ein riesen Denkfehler fals es sonst noch wer braucht hier :
if(strcmp(cmd,"/spec",true)==0)
{
if(IsPlayerAdmin(playerid))
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_YELLOW, "BENUTZE: /spec [Spieler-ID]");
return 1;
}
if(strval(tmp) == playerid) {
SendClientMessage(playerid, COLOR_YELLOW, "Du kannst Dich nicht selber beobachten !");
return 1;
}
giveplayerid = strval(tmp);
if(!IsPlayerConnected(giveplayerid)) {
format(string, sizeof(string), "ID (%d) Ist kein Aktiver Spieler",giveplayerid);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
TogglePlayerSpectating(playerid, 1);
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(giveplayerid));
SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
if (IsPlayerInAnyVehicle(giveplayerid)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(giveplayerid));
else PlayerSpectatePlayer(playerid, giveplayerid);
return 1;
}