Not working
#1

I have this code

pawn Код:
if(strcmp(cmdtext,"/ahq",true)==0)
  {
    if(!IsPlayerAdmin(playerid))
    {
    SetCameraBehindPlayer(playerid);
    ResetPlayerWeapons(playerid);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,0);
    SetPlayerPos(playerid,1172.9707,-2036.2747,69.1413);
    SetPlayerFacingAngle(playerid,87.6667);
    SendClientMessage(playerid,COLOR_YELLOW,"..::Admin HQ::..");
    SendClientMessage(playerid,COLOR_AWES,"Welcome to the Admins HQ");
  SendClientMessage(playerid,COLOR_YELLOW,"..::Admin HQ::..");
    }
    else SendClientMessage(playerid,COLOR_RED,"Unknown Command!Type /cmds for commands list!");
    {
    }
    }
    return 1;
    }
But it doesnt work! I mean if im not admin i can teleport!
Wat is wrong?
Reply
#2

[pawm]if(IsPlayerAdmin(playerid))[/pawn]

Reply
#3

Quote:
Originally Posted by Jeffry
[pawm]if(IsPlayerAdmin(playerid))[/pawn]

No that wont work...that works only if im logged in as RCON...i've also tried that before...someone else?
Reply
#4

Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by Jeffry
pawn Код:
if(IsPlayerAdmin(playerid))
No that wont work...that works only if im logged in as RCON...i've also tried that before...someone else?
well it certenly wont work with "if(!IsPlayerAdmin(playerid))" because "!" means not.
Reply
#5

Quote:
Originally Posted by jamesbond007
Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by Jeffry
pawn Код:
if(IsPlayerAdmin(playerid))
No that wont work...that works only if im logged in as RCON...i've also tried that before...someone else?
well it certenly wont work with "if(!IsPlayerAdmin(playerid))" because "!" means not.
and...how to fix that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)