04.11.2009, 18:35
Hello Scripters 
Alright, I am trying to put
to my Police Radio Script...
I want to connect the cmd to a Rank... like this...
But "0" Ranked can still use the cmd...
What to do? Thanks!

Alright, I am trying to put
Код:
PlayerInfo
Код:
if (strcmp("/ra", cmdtext, true, 3) == 0) { if (PlayerInfo[playerid][Rank] >= 1) if(GetPlayerTeam(playerid) != 8) return SendClientMessage(playerid,0xFF0000FF, "Identification Error - You are not a Police Officer with the correct Rank."); if(cmdtext[3] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /ra [text]"); new playername[26]; GetPlayerName(playerid, playername, 26); format(string, sizeof(string), "Radio Call from Officer %s:%s, over**", playername, cmdtext[3]); for(new i=0;i<MAX_PLAYERS;i++) { if(GetPlayerTeam(playerid) == 8) { SendClientMessage(i, 0x0000FFFF, string); } } return 1; }
Код:
if (PlayerInfo[playerid][Rank] >= 1)
What to do? Thanks!