SA-MP Forums Archive
Verry Small Script 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Verry Small Script Help (/showthread.php?tid=254944)



Verry Small Script Help - Odyssey - 13.05.2011

So, I just downloaded the JunkBuster filterscript and got it up and running, works nicely. Now, I also use gAdmin, and I would like to hook these two scripts up because it says I can. Now, here is the orignal code for the GodFather script:

Код:
Step 4)
	You are using a default admin system with for example levels? Not only RCON?
	You can link this admin system with JunkBuster.
	JunkBuster can't recognize your adminsystem so you must add a function.

	Function (This is only an EXAMPLE!):

		public IsPlayerAdminCall(playerid)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
				return 1;
			else
				return 0;
		}
And this is what you will LOL at, my failed attempt at changing it to suit gAdmin.

Код:
public IsPlayerAdminCall(playerid)
{
	if(IsPlayerAdmin(playerid))
	PlayerInfo[playerid][AdminLevel] = > 2; //I would like anyone over admin level 2 to use it
	return 1;
	else
	return 0;
}
The thing I need to know is where to place this part of the code in the script, what script? JunkBuster or the gAdmin script, and where. I also need to fix the code.


Re: Verry Small Script Help - Odyssey - 13.05.2011

Anyone?


Re: Verry Small Script Help - PrawkC - 13.05.2011

Код:
public IsPlayerAdminCall(playerid)
{
	if(PlayerInfo[playerid][AdminLevel] >= 2) //I would like anyone over admin level 2 to use it
	return 1;
	else
	return 0;
}



Re: Verry Small Script Help - MadeMan - 13.05.2011

Place it to gAdmin.


Re: Verry Small Script Help - Odyssey - 13.05.2011

Ok, I will test it now.