10.04.2014, 17:59
Hello i need how to create if player is admin and get minigun dont kick him.Buut if player is not admin kick him.
if(PlayerInfo[playerid][pAdmin] >= 1) return 1; // Replace PlayerInfo[playerid][pAdmin] by ur personnal var.
else return Kick(playerid);
public OnPlayerUpdate(playerid)
{
if(GetPlayerWeapon(playerid) == 38 && !IsAdmin(playerid)) return Kick(playerid); // RCON Admin
// OR with a personnal var
if(GetPlayerWeapon(playerid) == 38 && PlayerInfo[playerid][pAdmin] < 1) return Kick(playerid); //
return 1;
}
if(GetPlayerWeapon(playerid) == 38 && pInfo[playerid][Adminlevel] < 5) return Kick(playerid);
public OnPlayerUpdate(playerid) { if(GetPlayerWeapon(playerid) == 38 && pInfo[playerid][Adminlevel] < 5) return Kick(playerid); return 1; } |
C:\Users\Arlind\Desktop\fsdf\filterscripts\Project .pwn(5532) : warning 215: expression has no effect C:\Users\Arlind\Desktop\fsdf\filterscripts\Project .pwn(5532) : error 001: expected token: ";", but found ")" C:\Users\Arlind\Desktop\fsdf\filterscripts\Project .pwn(5532) : error 029: invalid expression, assumed zero C:\Users\Arlind\Desktop\fsdf\filterscripts\Project .pwn(5532) : warning 215: expression has no effect |
if(GetPlayerWeapon(playerid) == 38 && pInfo[playerid][Adminlevel] < 5) return Kick(playerid); |
enum pInfo
{
// Some vars
pLevel,
Adminlevel,
// Other vars
};
new pInfo[MAX_PLAYERS][pInfo];
enum PlayerInfo { Pass[129], //User's password Adminlevel, //User's admin level VIPlevel, //User's vip level Money, //User's money Scores, //User's scores Kills, //User's kills Deaths, //User's deaths Adisable, Banned, Pills, Savedskin, Last, NoPM, Drugs } |