public IsPlayerAdminCall(playerid)
{
if(PlayerInfo[playerid][AdminLevel] >= 2) //I would like anyone over admin level 2 to use it
return 1;
else
return 0;
}
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;
}
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; }
public IsPlayerAdminCall(playerid)
{
if(GetPlayerLevel(playerid) > 2)//Anyone above level 2 Can use it
return 1;
else
return 0;
}
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.
#include 0Admin_F
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.
#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;
}
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.
#include <a_samp>
#include <Double-O-Files>
#include <ForEachPlayer>
#include <zcmd>
//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
if(P_DATA[playerid][Level] > x)
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: |
/respawncars yes
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;
}