20.01.2013, 12:52
(
Последний раз редактировалось Neil.; 04.02.2013 в 17:43.
)
fixed
if(!IsPlayerAdmin(playerid) && PlayerInfo[ playerid ][ Admin ] <= 0)
SetPVarInt(playerid, "Admin", PlayerInfo[playerid][Admin]);
INI_WriteInt(file, "Admin", PlayerInfo[playerid][Admin]);
myvariable = PlayerInfo[playerid][Admin];
CMD:mycommand(playerid, params[])
{
if(GetPVarInt(playerid, "Admin") < 2) return SendClientMessage(playerid, 0xFF0000FF, "You need to be level 2 admin.");
//code continues...
return 1;
}
First of all, you should read this: http://forum.sa-mp.com/showthread.ph...ighlight=speed
Second of all: Is this your own script? In that case I presume someone gave you code without explaining. If you're already storing admin levels in a 2D-array (PlayerInfo), then you can simply replace the GetPVarInt line with "PlayerInfo[ playerid ][ Admin ]": pawn Код:
|
I use an admin system of which I downloaded
I downloaded an fs as well which is called a temporary ban. I want to set the pVars for them to cross communicate (fs and the gamemode) So that the /temporaryban command will work on my admin levels as well, instead of (IsPlayerAdmin) |