[HELP]Command says I am also not connected!!!
#1

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");
    else if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"The player is not connected");
    {
       new Float:x,Float:y,Float:z;
       GetPlayerPos(ID,x,y,z);
       SetPlayerPos(playerid,x,y+1,z);
    }
  }
 return true;
}
Lol,please help,when I type in my ID(0) says that The Player is not connected instead of telling that "You can't tele to yourself" and I can't spot mistake.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)