26.04.2014, 01:54
How i can make a command for admins only? Because i have a command which is /opengate and /closegate that is in the admin base gate, and only only admins must be can open it, but i try to log in with different name (ordinary player) in my server and do the command /opengate and /closegate and it works! I need help how to fixed this cmd to be for admin use only!!!
Код:
} public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/opengate", true, 14)) { MoveObject(aGate, 2920.35253906,-796.28979492,04.04159927, 3.0); SendClientMessage(playerid, 0xEF994300, "The Gate Has Been Opened!"); return 1; } if(!strcmp(cmdtext, "/closegate", true, 16)) { MoveObject(aGate, 2920.35253906,-796.28979492,10.04159927, 3.0); SendClientMessage(playerid, 0xEF994300, "The Gate Has Been Closed!"); return 1; } return 0; }