Junkbuster to ladmin .
#1

Hello i cant understand that step ?
Код:
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;
		}

	IMPORTANT:
	This function depends on YOUR admin system. The function above is ONLY FOR GODFATHER so you
	may have to customize this function.
	If you do not add this function admin immunity will only work for RCON-admins!!!
	
	PS:
	JunkBuster is compatible with the default Godfather gamemode! (Tested)
cpde exaple:
Код:
CMD:sethealth(playerid,params[]) {
	if(PlayerInfo[playerid][Level] >= 3) {
	    new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
	    if(isnull(tmp) || isnull(tmp2) || !IsNumeric(tmp2)) return SendClientMessage(playerid, red, "USAGE: /sethealth [playerid] [amount]");
		if(strval(tmp2) < 0 || strval(tmp2) > 100 && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid, red, "ERROR: Invaild health amount");
		new player1 = strval(tmp), health = strval(tmp2), string[128];
		if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
			CMDMessageToAdmins(playerid,"SETHEALTH");
			format(string, sizeof(string), "You have set \"%s's\" health to '%d", pName(player1), health); SendClientMessage(playerid,blue,string);
			if(player1 != playerid) { format(string,sizeof(string),"Administrator \"%s\" has set your health to '%d'", pName(playerid), health); SendClientMessage(player1,blue,string); }
   			return SetPlayerHealth(player1, health);
	    } else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Reply
#2

pawn Код:
public IsPlayerAdminCall(playerid)
        {
            if(PlayerInfo[playerid][Level] >= 1)
                return 1;
            else
                return 0;
        }
would be your system not sure what a level 1 is though
Reply
#3

but where i add cmd ?
Reply
#4

pump
Reply
#5

I got it thans for help -.-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)