1) Use OnPlayerCommandText, not OnPlayerCommandReceived.
2) It's GetPlayerVirtualWorld(playerid) not GetPlayerVirtualWorld[playerid]
Posts: 6,129
Threads: 36
Joined: Jan 2009
In short, this should work:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (GetPlayerVirtualWorld(playerid) == 10 && !strcmp(cmdtext, "/help") && !strcmp(cmdtext, "/ask")) {
SendClientMessage(playerid, 0xFF0000AA, "You cannot use any command just /help & /ask");
return 0;
}
return 1;
}
[03]Garsino must have accidentally typed the wrong brackets and forgotten the exclamation mark before strcmp() or == 0 at the end, and was thinking you were using a more modern command processor (zcmd).
Posts: 145
Threads: 53
Joined: Sep 2011
Reputation:
0
That'll work for strcmp I need it for DCMD or SSCANF
Posts: 516
Threads: 153
Joined: Sep 2009
Reputation:
0
easy is check in help command that player is jail you return that he can't use it
Posts: 6,129
Threads: 36
Joined: Jan 2009