Little Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little Help (
/showthread.php?tid=320074)
Little Help -
Zxdsl - 21.02.2012
level 10 Can Use This Feature ,How To Make it for only rcon admin ? ?
Код:
case 4:{
if (PlayerInfo[playerid][Level] >= 10 && PlayerInfo[playerid][LoggedIn] == 1) {
aresetcar(playerid);
SendClientMessageToAll(COLOR_ORANGE, "Vehicle Has Been Reset.");
}
else{ SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not a level 10 admin and cannot use this feature!"); }
HideMenuForPlayer(Current, playerid);
TogglePlayerControllable(playerid, true);
}
case 5:{
if (PlayerInfo[playerid][Level] >= 10 && PlayerInfo[playerid][LoggedIn] == 1) {
aresetallcar();
fremove(V_FILE_SAVE);
LoadVehicles();
SendClientMessageToAll(COLOR_ORANGE, "All Vehicles Have Been Reset.");
}
else{ SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not a level 10 admin and cannot use this feature!"); }
HideMenuForPlayer(Current, playerid);
TogglePlayerControllable(playerid, true);
}
Re: Little Help -
emokidx - 21.02.2012
if you want only rcon admins
pawn Код:
if(IsPlayerAdmin(playerid))
{
//code
}
if both admins and rcon admin
pawn Код:
if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][Level] >= 1)
{
//code
}
Re: Little Help -
Zxdsl - 21.02.2012
@emokidx111 Ty +REP
Re: Little Help -
Slash_ - 21.02.2012
it goes to ''if(IsPlayerAdmin(playerid))''