pawn Код:
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_RED, "/GOTO [ID / NAME]");
if(Restrictgoto == 1) return SendClientMessage(playerid, COLOR_RED, "You Cannot Use This Command reason:[DISABLED]");
if(IsCaged[pID] == 1) return SendClientMessage(playerid, COLOR_RED, "You can't use this command when you are caged!");
if(duel[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "you cannot goto use /exitduel");
if(duel[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "you cannot goto use /exit duel");
if(GetPVarInt(playerid, "Jailed") == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command when jailed.");
if(IsInChallenge[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command in a challenge.");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected.");
if(IsInChallenge[pID] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command on a player in a challenge.");
if(IsSpecing[pID] == 1 || OnDuty[pID] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot /goto this player at the moment.");
if(playerid == pID) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command on yourself.");
if(StopGoto[pID] == 1) return SendClientMessage(playerid, COLOR_RED, "This player has disabled using /goto on him.");
if(duel[pID] == 1) return SendClientMessage(playerid, COLOR_RED, "you cannot goto this player do /duel");
The problem is you don't give an id to check as [ISS]jumbo said. You have to put an id first.
pawn Код:
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_RED, "/GOTO [ID / NAME]");