09.03.2012, 09:06
if your using strcmp
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128],idx;
cmd = strtok(cmd,idx);
if(PlayerInfo[playerid][pAdmin] == 0)
{
new name[24];
GetPlayerName(playerid,name,24);
new str[128];
format(str,128,"%s used command: %s",name,cmd);
for(new i;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[i][pAdmin] != 0)
{
SendClientMessage(i,0xAAAAAAAA,str);
}
}
}
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}