SA-MP Forums Archive
Admin Only Area With Xtreme Admin? - 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: Admin Only Area With Xtreme Admin? (/showthread.php?tid=6235)



Admin Only Area With Xtreme Admin? - serj009 - 07.07.2007

Hey..is there a way i can make an admin level 10 only area with xtreme admin??

This is what i wanna do...


I want to have Area 69 accessable to ONLY admins level 1+ and if they are not admin level 1+ they will die.


im using this code:
Code:
public AdminArea(playerid)
{
	new i, j, Float:X, Float:Y, Float:Z;
	for (i = 0, j = MAX_PLAYERS; i < j; i++) {
	GetPlayerPos(playerid, X, Y, Z);
	if(X >= 1677.2161 && X <= 1688.0834 && Y >= -2276.6697 && Y <= -2263.4658) { //Replace with your own x/y min/max coords
		if (IsPlayerAdmin(playerid)/*|| Level[playerid] == Admin*/) {
		} else {
			GameTextForPlayer(playerid,"~g~ THIS IS A RESTRICTED AREA!~r~ LICENSED PERSONEL ONLY!",10000,5);
			SendClientMessage(playerid, COLOR_RED, "THIS IS A RESTRICTED AREA! LICENSED PERSONEL ONLY!");
	 		SetPlayerHealth(playerid, -99999999.99);
		}
	}}
}
thx!


Re: Admin Only Area With Xtreme Admin? - Mycosis - 15.07.2007

Hi. When i use your code i get
Code:
C:\servers\samp\filterscripts\XtremeAdmin2.pwn(148) : warning 235: public function lacks forward declaration (symbol "AdminArea")
What does it mean?

This is the script:
Code:
public AdminArea(playerid)
{
	new i, j, Float:X, Float:Y, Float:Z;
	for (i = 0, j = MAX_PLAYERS; i < j; i++) {
	GetPlayerPos(playerid, X, Y, Z);
	if(X >= 1677.2161 && X <= 1688.0834 && Y >= -2276.6697 && Y <= -2263.4658) { //Replace with your own x/y min/max coords
		if (IsPlayerAdmin(playerid)/*|| Level[playerid] == Admin*/) {
		} else {
			GameTextForPlayer(playerid,"~g~ THIS IS A RESTRICTED AREA!~r~ STAFF ONLY!",10000,5);
			SendClientMessage(playerid, red, "THIS IS A RESTRICTED AREA! STAFF ONLY!");
	 		SetPlayerHealth(playerid, -99999999.99);
		}
	}}
	return 1;
}



Re: Admin Only Area With Xtreme Admin? - Joske_Vermeulen - 15.07.2007

Quote:
Originally Posted by Mycosis
Hi. When i use your code i get
Code:
C:\servers\samp\filterscripts\XtremeAdmin2.pwn(148) : warning 235: public function lacks forward declaration (symbol "AdminArea")
What does it mean?
just forward it as it says it himself , not necessary


Re: Admin Only Area With Xtreme Admin? - gtamaster - 08.01.2008

Quote:
Originally Posted by =Contador=
Quote:
Originally Posted by Mycosis
Hi. When i use your code i get
Code:
C:\servers\samp\filterscripts\XtremeAdmin2.pwn(148) : warning 235: public function lacks forward declaration (symbol "AdminArea")
What does it mean?
just forward it as it says it himself , not necessary
Just add this:
[code=Admin Area Forward Code by GtaMaster]forward AdminArea(playerid);[/code]


Re: Admin Only Area With Xtreme Admin? - [SDO]Tako - 16.02.2009

this script doesnґt work for me ... can somebody help me ?