new bool:perm[MAX_PLAYERS];
COMMANDerm(playerid, params[])
{ perm[playerid] = true; return 1; } but its just a command you'll need to use sscanf. |
CMD:perm(playerid, params[]) { new targetid; if (sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, " Usage: /per <playerid> "); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, " Player is not connected !"); perm[targetid] = true return 1; }
C:\Users\User\Desktop\Other Games\yцntem 1 - Kopya\Yeni klasцr\samp03z_svr_R1_win32\gamemodes\server.pwn(203) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\Other Games\yцntem 1 - Kopya\Yeni klasцr\samp03z_svr_R1_win32\gamemodes\server.pwn(203) : error 017: undefined symbol "cmd_perm" C:\Users\User\Desktop\Other Games\yцntem 1 - Kopya\Yeni klasцr\samp03z_svr_R1_win32\gamemodes\server.pwn(203) : error 029: invalid expression, assumed zero C:\Users\User\Desktop\Other Games\yцntem 1 - Kopya\Yeni klasцr\samp03z_svr_R1_win32\gamemodes\server.pwn(203) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
CMD:perm(playerid, params[])
CMD:perm(playerid, params[])
{
new targetid;
if (sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, " Usage: /per <playerid> ");
if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, " Player is not connected !");
if(perm[playerid] == true)
{
perm[playerid] = false;
}
else if(perm[playerid] == false)
{
perm[playerid] = true;
}
return 1;
}
CMD:perm(playerid, params[]) { new targetid; if (sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, " Usage: /per <playerid> "); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, " Player is not connected !"); if(perm[playerid] == true) { perm[playerid] = false; } else if(perm[playerid] == false) { perm[playerid] = true; } return 1; }