31.10.2009, 18:48
Code:
if (strcmp("/command", cmdtext, true)==0)
{
if(IsPlayerLAdmin(playerid))
{
//Thing you want to do here and no don't put a return after the command here.
}
else SendClientMessage(playerid, 0xFF0000AA, "You are not a admin");
return 1;
}
Example:
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/command", cmdtext, true)==0)
{
if(IsPlayerLAdmin(playerid))
{
SendClientMessage(playerid, 0xFF0000AA, "You are a admin");
}
else SendClientMessage(playerid, 0xFF0000AA, "You are not a admin");
return 1;
}
return 0;
}

