Verry Small Script Help
#1

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.
Reply
#2

Anyone?
Reply
#3

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

Place it to gAdmin.
Reply
#5

Ok, I will test it now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)