02.06.2011, 11:59
Okay. You need to create an enum or place something like this in the enum.
Then place your command in an if statement, like so.
PHP код:
enum pInfo
{
pCop,
}
new PlayerInfo[MAX_PLAYERS][pInfo]
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCop] == 1)
{
//CODE
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI / SAST /PG.");
}
return 1;
}
return 0;
}