Authority
#1

I started using zcmd and the other feature forgot the name, I came up with this:
Now, I just want to ask, what is the problem with my code ? every player can use it, while not being an admin, even though I defined everything.
pawn Код:
CMD:goto(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 1){return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");

}else
{
new pID;

  new otherId;


  new string[256];



if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "* Invalid player ID!");
    {
     if(sscanf(params, "rii", otherId)) return SendClientMessage(playerid, 0xAFAFAFAA, "Usage: /goto [PlayerID/PartOfName]");
  format(string, sizeof(string), "* You have successfully teleported your self",playerid);
  SendClientMessage(playerid, COLOR_LIGHTRED, string);


    new Float:x, Float:y, Float:z;
    GetPlayerPos(otherId, x, y, z);
    SetPlayerPos(playerid, x+1, y, z);






}

        }
    return 1;
}
Reply


Messages In This Thread
Authority - by Scriptissue - 07.10.2010, 22:38
Re: Authority - by Calgon - 07.10.2010, 22:40
Re: Authority - by Lenny the Cup - 07.10.2010, 22:42
Re: Authority - by Scenario - 07.10.2010, 22:46
Re: Authority - by Lenny the Cup - 07.10.2010, 22:49

Forum Jump:


Users browsing this thread: 1 Guest(s)