Heyho, wenn ein Admin spec nutzt und einen User beobachten will, stirbt der Admin automatisch, aber es kommt kein Error bei dem Befehl, weiß einer eine Lösung?
Code
COMMAND:spec(playerid,params[])
{
if(PlayerAdmin[playerid] < 1) return SendClientMessage(playerid,COLOR_RED,"You can not use this command!");
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"Usage: /spec <player>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Player is not connected!");
if(GetPVarInt(playerid,"TV") == 0)
{
SetPVarInt(playerid,"TV",1);
TogglePlayerSpectating(playerid,1);
PlayerSpectatePlayer(playerid,id);
}
else if(GetPVarInt(playerid,"TV") == 1)
{
SetPVarInt(playerid,"TV",0);
TogglePlayerSpectating(playerid,0);
}
return 1;
}
Alles anzeigen