01.04.2014, 01:22
(
Последний раз редактировалось SickAttack; 01.04.2014 в 01:57.
)
Quote:
pawn Код:
|
You should make OnPlayerText forward to a zcmd scripted command. Like below:
pawn Код:
new string[128], cmd[128], params[128]; // Define the parameters with their string size witch will be split.
sscanf(text, "s[128]s[128]", cmd, params); // Split the text into two parameters.
if(pInfo[playerid][AdminLevel] >= 1)
{
if(strcmp(cmd, "!", true) == 0) return 0; // If player types !, it won't show anything just like when you type /.
if(strcmp(cmd, "!", true, 1) == 0) // This is needed as it allows the player with admin status chat.
{
if(strcmp(cmd, "!nUllstrIngtonoTbeUseddpljmhuyf", true, 31) == 0) return 0; // This fixes the bug when you send a message with a space.
if(strcmp(cmd, "!warn", true, 5) == 0) {cmd_acmdwarn(playerid, params); return 0;} // This forwards !warn to a zcmd command.
else
{
format(string,sizeof(string),"{A5FF00}Unknown admin command (%s) | Use !commands to list all available admin commands.", cmd);
SendClientMessage(playerid, COLOR_RED, string);
}
}
return 0;
}
pawn Код:
if(pInfo[playerid][AdminLevel] == 0)
{
if(strcmp(cmd, " ", true, 1) == 0)
{
if(strcmp(cmd, "!nUllstrIngtonoTbeUseddpljmhuyf", true, 31) == 0) return 0;
return 0;
}
}
Good luck buddy!
PS: I'm the friend mentioned above .