SA-MP Forums Archive
adminonly class - 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: adminonly class (/showthread.php?tid=72224)



adminonly class - [SW]thekillaer - 07.04.2009

is there a way to make it so one of class can only be used if the persons name is thekillaer bears4life and lilsk8r

and if the person isnt named any of those it says This Class Is restricted For admins only in COLOR_RED

the class is



Код:
AddPlayerClass(124,414.4904,2534.1506,19.1484,168.6712,22,1000,46,0,29,1000); //

		case 6:
 {

				GameTextForPlayer(playerid, "~r~Admin Only", 500, 3);

			}



Re: adminonly class - Torekk - 07.04.2009

Well, you could either check if the player's name is thekillaer, bears4life or lilsk8r, but than everyone could use the class. Why not check if the player is an real admin(rcon) with
pawn Код:
if(PlayerIsAdmin(playerid)
{
  //if player is admin
} else {
  //if player is NOT an admin
}
?

You can then only select those classes when you logged in via /rcon login <rcon_password>

I don't really know where you'd add that into your script, the "case 6:" kinda confuses me.


Re: adminonly class - s0nic - 07.04.2009

Should Solve Your Questions and shit:
https://sampwiki.blast.hk/wiki/AdminSkins