SA-MP Forums Archive
Good Feature, But only for admins... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Good Feature, But only for admins... (/showthread.php?tid=162190)



Good Feature, But only for admins... - OldDirtyBastard - 22.07.2010

Ok so, i just got this Ironman FS which alows you to fly and stuf
But i only want it for admins, im currently using L-Admin(Lethal Admin)Filterscript..
I tryed to get the Ironman code to L-Admin but pwno crashed everytime i tryed to compile it...
Has anybody a suggestion about making some rule that only lv5 admins can use the command /ironman?
Regards.


Re: Good Feature, But only for admins... - xfelipex - 22.07.2010

err... maybe about the function (not command) :
Код:
 if(IsPlayerAdmin(playerid) == 5)



Re: Good Feature, But only for admins... - Mystique - 22.07.2010

If it's in Ladmin it should be like this.

Код:
if(PlayerInfo[playerid][Level] >= 5)
{
   The command
}



Re: Good Feature, But only for admins... - DJDhan - 22.07.2010

Checking if a player is an admin comes later, if you can't transfer the [FS] Iron Man into [FS] L Admin, you can search the forum. Someone asked the exact same question before so you'd get your answer, about your script crashing, there.


Re: Good Feature, But only for admins... - John_F - 22.07.2010

Checking if a player is an admin comes after executing the cmd, so put the cmd code first then inside it put
if players admin lvl >=5
execute code
else
sendclientmessage "you are not an admin!"