if (GetPlayerVirtualWorld[playerid] == 1)
{
SendClientMessage(playerid, 0xFF0000AA, "You cannot use any command just /help & /ask");
return 0;
}
While the player is in jail i dont want him to be able to use any cmd just /help & /ask
|
if (GetPlayerVirtualWorld[playerid] == 1 && strcmp(cmdtext, "/help") && strcmp(cmdtext, "/ask")) return SendClientMessage(playerid, 0xFF0000AA, "You cannot use any command just /help & /ask");
C:\Users\Alex\Desktop\Untitled.pwn(133) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandReceived")
C:\Users\Alex\Desktop\Untitled.pwn(135) : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerVirtualWorld"
C:\Users\Alex\Desktop\Untitled.pwn(135) : warning 215: expression has no effect
C:\Users\Alex\Desktop\Untitled.pwn(135) : error 001: expected token: ";", but found "]"
C:\Users\Alex\Desktop\Untitled.pwn(135) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Untitled.pwn(135) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if (GetPlayerVirtualWorld[playerid] == 10 && strcmp(cmdtext, "/help") && strcmp(cmdtext, "/ask")) return SendClientMessage(playerid, 0xFF0000AA, "You cannot use any command just /help & /ask");
{
}
return 1;
}
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).
|