SA-MP Forums Archive
Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem (/showthread.php?tid=428773)



Problem - [..MonTaNa..] - 07.04.2013

....


Re: Problem - iJumbo - 07.04.2013

You just set IsCaged[pID] to 0 when player get uncaged?

and of course SScanf should be the frist in list like

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");
becouse you just bring playerid to a var pID and its a sscanf get


Re: Problem - [..MonTaNa..] - 07.04.2013

Removed.


Re: Problem - BlackID - 07.04.2013

Try to change

pawn Код:
IsCaged[pID]
to

pawn Код:
IsCaged[playerid]



Re: Problem - [..MonTaNa..] - 07.04.2013

Removed.


Re: Problem - ]Rafaellos[ - 07.04.2013

The problem is you don't give an id to check as [ISS]jumbo said. You have to put an id first.

Code from [ISS]jumbo:

pawn Код:
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_RED, "/GOTO [ID / NAME]");
@BlackID: Why change that?