13.12.2009, 21:07
i set up the /commands in OnPlayerCommandText but if i type something like "/g" or "/<anyword>" it shows the "/commands" instead of an error
heres the OnPlayerCommandText section
heres the OnPlayerCommandText section
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[256];
new idx;
tmp = strtok(cmdtext, idx);
dcmd(closegate,9,cmdtext);
dcmd(opengate,8,cmdtext);
if(strcmp(cmd, "/commands", true) == 0)
{
SendClientMessage(playerid,0x800080AA,"[General:]/report | /stats | /register | /login | /eng | /heb | /spn");
return 1;
}
return SendClientMessage(playerid,0xFF8040FF,"[SERVER:] Type /commands to see a list of commands!");
}