SA-MP Forums Archive
[HELP]Command message problem!!!(please help) - 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: [HELP]Command message problem!!!(please help) (/showthread.php?tid=286002)



[HELP]Command message problem!!!(please help) - Cjgogo - 26.09.2011

FIXED!!!



Re: [HELP]Command message problem!!!(please help) - Wesley221 - 26.09.2011

pawn Код:
COMMAND:goto(playerid,params[])
{
  if(GetPVarInt(playerid,"Adminlevel") < 1) return SendClientMessage(playerid,COLOR_RED,"This command is only for admin level 1");
  if(GetPVarInt(playerid,"Adminlevel") >=1)
  {
    new ID;
    if(sscanf(params,"u",ID)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/goto [ID]");
    else if(ID == playerid) return SendClientMessage(playerid,COLOR_RED,"You can't teleport to yourself"); // you said to the compiler 'if ID 'DOESNT EQUAL' to playerid' (!=)
    else if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"The player is not coonnected");
    {
       new Float:x,Float:y,Float:z;
       GetPlayerPos(ID,x,y,z);
       SetPlayerPos(playerid,x,y+1,z);
    }
  }
 return true;
}
Edit:
Same thing for the other command


Re: [HELP]Command message problem!!!(please help) - Cjgogo - 26.09.2011

lolz looks like i am tired,thx wesley you rock


Re: [HELP]Command message problem!!!(please help) - Wesley221 - 26.09.2011

Youre not the only one, im already 8 hours at school, and still have 1 hour to go :S
Anyways, youre welcome!