Linking 0Admin to JunkBuster
#1

So, I recenlty upgraded from gAdmin to 0Admin, now, I linked gAdmin to JunkBuster without any problems.

This is what I used for gAdmin:

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

But its NOT working for 0Admin.

I got this in the 0Admin post.

pawn Код:
if(!strcmp(cmdtext, "/command"))
{
     if(GetPlayerLevel(playerid) > 3)
     {
           //Admin level 3 code here
     }else return SendClientMessage(playerid, ~1, "You are not allowed to use this command!");
     return 1;
}
And this in the JunkBuster readme:

Код:
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 made this and placed it in the 0Admin FilterScript:

pawn Код:
public IsPlayerAdminCall(playerid)
        {
            if(GetPlayerLevel(playerid) > 2)//Anyone above level 2 Can use it
                return 1;
            else
                return 0;
        }
Got this:

Код:
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(382) : warning 201: redefinition of constant/macro (symbol "Public:%0(%1)")
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10946) : error 017: undefined symbol "GetPlayerLevel"
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10946) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10946 -- 10947) : warning 215: expression has no effect
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10947) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10947) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
So I added this to the 0Admin script
pawn Код:
#include 0Admin_F
got this:

Код:
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(383) : warning 201: redefinition of constant/macro (symbol "Public:%0(%1)")
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10947) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10947 -- 10948) : warning 215: expression has no effect
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10948) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10948) : warning 217: loose indentation
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10949) : warning 225: unreachable code
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10949) : warning 217: loose indentation
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10949) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10949 -- 10950) : warning 215: expression has no effect
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10950) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10950) : warning 217: loose indentation
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\0Admin.pwn(10952) : warning 203: symbol is never used: "__Name"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Then I tried making a filterscript for it:

pawn Код:
#include <a_samp>
#include <JunkBuster>
#include 0Admin_F

public IsPlayerAdminCall(playerid)
        {
            if(GetPlayerLevel(playerid) > 3))//Anyone above level 2 Can use it
                return 1;
            else
                return 0;
}
And then got this:

Код:
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(7) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(7 -- 8) : warning 215: expression has no effect
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(8) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(8) : warning 217: loose indentation
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(9) : warning 225: unreachable code
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(9) : warning 217: loose indentation
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(9) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(9 -- 10) : warning 215: expression has no effect
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(10) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(10) : warning 217: loose indentation
C:\Documents and Settings\Ed\Desktop\SAMP Virtual Pilots\filterscripts\Junk0Admin.pwn(12) : warning 203: symbol is never used: "__Name"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Guys please help! It worked fine with gAdmin, so why not with 0Admin! Someone please help. It is driving me nuts! I gave you as much detail as I can give. And I would hate to downgrade back to gAdmin becuase its so buggy and 0Admin is the best admin script out there.
Reply
#2

Anyone?
Reply
#3

First of all you are defining twice the Public:
Remove the define from the JunkBuster.

Anything else, please post.
Reply
#4

This is all the includes I have in the JunkBuster script:

pawn Код:
#include <a_samp>
#include <Double-O-Files>
#include <ForEachPlayer>
#include <zcmd>
And all the includes in the 0Admin script:

pawn Код:
//Main Include
#include <a_samp>
//JunkBuster
#include <JunkBuster>


                            /*-----------------------------------------------
                            Don't change this otherwise whirlpool won't work!*/

                            #define MAX_INI_ENTRY_TEXT 130
                            #undef MAX_PLAYER_NAME
                            #define MAX_PLAYER_NAME 24
                            /*-----------------------------------------------*/

//Includes
#include <  YSI/Y_ini   >
#include <  sscanf2     >
#include <  zcmd        >
#include <  foreach     >
#include <  regex       >
//#include YSI/y_scripting
I also removed the cookie system and when you log on it dosent show the Online time/kills/death, becuase I didnt want that. So where do I need to put my code and what includes do I need to add/remove and where?
Reply
#5

Ahh, so you want to use JB straight into 0Admin.
Okay then, don't use the include, use just the variables inside 0Admin.

pawn Код:
if(P_DATA[playerid][Level] > x)
Reply
#6

Ahh thanks.

I'm such a noob when it comes to things like this, :P

Your help was much apreciated.

-Edit just read the PM
Reply
#7

Quote:
Originally Posted by techkid100
Посмотреть сообщение
Ahh thanks.

I'm such a noob when it comes to things like this, :P

Your help was much apreciated.

Also, while you are here, can you help me, I do /respawncars, then it says /respawncars [YES], so I do that, but nothing happens:

The yes parameter is a "sure you want" feature.

Just type yes as the parameter.

pawn Код:
/respawncars yes
Reply
#8

No, that didnt work, dw, I just edited the code:

pawn Код:
CMD:respawncars(PARAMS)
{
    LoginCheck(playerid);
    LevelCheck(playerid, 5);
    {
            for (new v = 0; v < MAX_VEHICLES; v++)
            {
                if(!VehicleOccupied(v))
                {
                    SetVehicleToRespawn(v);
                }
            }
            SendAdminCMD(playerid, "Admin "ORAN"%s[%i]"GREY" respawned all server unoccupied vehicles!", Name(playerid), playerid);
            SendClientMessage(playerid, Color:GREY, "You respawned all server unoccupied vehicles!");
    }
   
    return 1;
}
And I will do for all commands what require a "Yes".
Reply
#9

CMD:respawncars(PARAMS)
{
LoginCheck(playerid);
LevelCheck(playerid, 5);
{
for (new v = 0; v < MAX_VEHICLES; v++)
{
if(!VehicleOccupied(v))
{
SetVehicleToRespawn(v);
}
}
SendAdminCMD(playerid, "Admin "ORAN"%s[%i]"GREY" respawned all server unoccupied vehicles!", Name(playerid), playerid);
SendClientMessage(playerid, Color:GREY, "You respawned all server unoccupied vehicles!");
}

return 1;
remove the ADMIN "ORAN" it will say ORAN NOTIS HAs respawned all the vehicle :O

}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)