[FilterScript] sbAdmin - Advanced MySQL Administration System
#1



sbAdmin - Advanced MySQL Administration System
Script Version: 1.1 | MySQL Version: R39-4

Information
Hello all guys, today I am proud to announce you that sbAdmin is released. After months of its development I managed to make the first version. I wanted to keep this script for myself to use it on my upcoming gamemodes, but I decided to release it. This filterscript is similar with GAdmin since we both are using updated functions and includes also I copied some of his functions that helped me on implementing more features easier (I got his permission to release them AGAIN). This script is based on MySQL (BlueG plugin) and with ThePhenix's include that saved me a lot of time with simplifying the queries. Thi filterscript designed for Newbies so everyone can edit it, its tables and make it working without complex steps, the only thing you have to do is to set up your MySQL's host info which you one you can find on your host's provider. Gamemode is fully configurable.



Downloads
sbAdmin - Full PackageMediafire
sbAdmin - View OnlyPastebin
sscanf2https://sampforum.blast.hk/showthread.php?tid=570927
easy-mysql.inchttps://sampforum.blast.hk/showthread.php?tid=590310
izcmd.inchttps://sampforum.blast.hk/showthread.php?tid=576114
timestamptodate.inchttps://sampforum.blast.hk/showthread.php?tid=347605
streamerhttps://sampforum.blast.hk/showthread.php?tid=102865
Features
This list won't be updated with upcoming versions features check changelog for updates!
  • 5 levels of admins (Configurable)
  • 3 levels of VIPs (Configurable)
  • Helper system with 1 level (Not configurable)
  • Saving logs (Configurable)
  • Ability to read the commands (Configurable)
  • Ability to force register/login dialogs
  • Ability to change tables name
  • Tables will be auto created with your configurable info
  • Ability to change each admin's level name
  • Ability to change each vip's level name
  • Ability to set MAX admin levels
  • Ability to set MAX vip levels
  • Ability to set MAX warnings where the player can get before get kicked
  • Ability to set MAX attempts where the player can have before get kicked (On login/register)
  • Jail, mute, cmd mute and warns are saving the database so player will never avoid his/her punishments
  • Custom saving player's online time (Gammix)
  • Advanced BAN system with Offline ban, Temp Ban and IP ban
  • Advanced jail system with custom interior
  • Mute system
  • Command mute system
  • SHA256 passwords hashing
  • Saving account's ID
  • Saving registered date
  • Saving Last date where player was online
  • Wanteds system, if a player will kill another killer will gain 1 wanted and victim will loose all of his wanteds
  • Custom function that you can use anywhere in your script
  • Anti Advertising system (Configurable)
  • And much more to discover in script




Changelog
Code:
  • Version 1.1 (13/11/2015) - Fixed /unjail command - Fixed a bug on /admins command - Fixed a bug on /vips command - Fixed a bug on /helpers command

Functions
  • SendClientMessageToAdmins(color, message[])
    Usage: SendClientMessage only for admins

  • IsPlayerHelper(playeid)
    Usage: Checks if player is a helper

  • GetLevel(playerid)
    Usage: Gets player's admins level

  • IsPlayerAdminEx(playerid)
    Usage: Check if player is admin (According to my functions)

  • GetPlayerWarns(playerid)
    Usage: Gets player's warns

  • GetVipLevel(playerid)
    Usage: Gets player's VIP level

  • IsPlayerVip(playerid)
    Usage: Checks if player is VIP

  • IsPlayerMuted(playerid)
    Usage: Checks if player is muted

  • IsPlayerCMDMuted(playerid)
    Usage: Checks if player is command muted

  • IsPlayerJailed(playerid)
    Usage: Checks if player is jailed

  • JailPlayer(playerid)
    Usage: Place a player to jail

  • UnJailPlayer(playerid)
    Usage: Remove a player from jail

  • LoadObjects(playerid)
    Usage: Load player's objects




Commands

Admin Commands
Level 1 Commands
/acmds /spec /specoff /weapons /spawn /goto /(ann)ounce /warn /remwarns
/jailed /muted /cmdmuted /explode /disarm /freeze /unfreeze /slap /mute
/unmute /respawncars /ip /car /fix /asay /kick
Level 2 Commands
/akill /jail /unjail /bring /cmdmute /uncmdmute /cleardwindows /ban /cc
/aheal /aarmour /setinterior /setworld /jetpack
Level 3 Commands
/fakedeath /giveweapon /sethealth /setarmour /healall /armourall
/givecash /givescore /unban /teleplayer
Level 4 Commands
/oban /setcash /setscore /setwanteds /setkills /setdeaths /giveallscore
/giveallcash /giveallweapon /setalltime /setallweather
Level 5 Commands
/fakecmd /fakechat /removeacc /setlevel /sethelper /setvip /gmx
Player Commands
/report /stats /ostats /changename /changepass /admins /vips /helpers
Helper and VIP commands are under development



Bugs
This version is a beta version and not a stable one, more features and updates will be added soon. I have double checked all functions and command inside the script and everything is working properly in case where you face any bug please let me know with a reply.




Suggestions
Since I will keep working on this project you can leave your suggestions and I will may add them on next versions.




Installation
Script is designed to be used from everyone since it uses simple and understandable functions, tables will be auto created when you boot your server (If they don't exist)


Code:
1. Download sbAdmin.rar package
2. Open sbAdmin.pwn file with your pawno editor
3. Edit MySQL and normal configuration to your own
4. Compile the script
5. Run your server, if you need help on how to load plugins etc. you can check server.cfg file I am providing in package


Questions
You have any question or you are facing any problem with my script? Leave a reply bellow and I will answer you when I will be able to




Questions
You have any question or you are facing any problem with my script? Leave a reply bellow and I will answer you when I will be able to




License
Since I am providing the source code you are free to whatever you want with the script except from releasing my script and just don't giving me credits, I am not here to get reputations or something I just want to help some people because we all know how hard is it to make an administration system from scratch




Special thanks to
Code:
ThePhenix for his easy-mysql include that made the code more readable
Gammix for spectate system and some other functions I got from him (Got the permission)
Emmet_ for his includes and plugins
Incognito for streamer plugin
SAMP Team for a_samp include
Jochemd for timestamptodate
Yashas for IZCMD command processor
Reply
#2

Can you provide pastebin link?
Reply
#3

Quote:
Originally Posted by Slotomic
View Post
Can you provide pastebin link?
Pastebin added, check downloads table
Reply
#4

*My cringy reply can be seen in SecretBoss's reply.*
Reply
#5

Quote:
Originally Posted by [ND]xXZeusXx.
View Post
Finally its out!, your efforts are worth m9, rep++;

i cant rep, it says reped too much for today... kalcor hates me

/ban kalcor noob
Lel, thanks mate I am not here to get a REP I am just trying to help out some people

Also if you have any suggestion leave a reply I am out of ideas xD
Reply
#6

Good work man but please add multi language (turkish)
Reply
#7

Waw, good job.
Lots of commands tho.
I gotta view your codes and check for bugs (if theres any) xD
Edit: You can improve your loop players code like that.
PHP Code:
#define LOOP_PLAYERS(%0) \
        
for(new %GetPlayerPoolSize(); %> -1IsPlayerConnected(%0); %0--) 
No need to create 2 variables
Also, replace the loop in respawncars command to this
PHP Code:
for(new cars GetVehiclePoolSize(); cars > -1cars--) 
if someone got 500 vehicle in his server, no need to loop the MAX_VEHICLES, because MAX_VEHICLES = 2000.
Also no need to use this
PHP Code:
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0); 
after using RepairVehicle(vehid); because it sets veh health to 1000 already.
In your cc command (clearchat)
No need to use
PHP Code:
for(new i250i++) 
because the chatbox gets only last 50 lines so just use this
PHP Code:
for(new 50> -1i--) 
Reply
#8

Nice one.
Reply
#9

Quote:
Originally Posted by PawnHunter
View Post
Waw, good job.
Lots of commands tho.
I gotta view your codes and check for bugs (if theres any) xD
Edit: You can improve your loop players code like that.
PHP Code:
#define LOOP_PLAYERS(%0) \
        
for(new %GetPlayerPoolSize(); %> -1IsPlayerConnected(%0); %0--) 
No need to create 2 variables
Also, replace the loop in respawncars command to this
PHP Code:
for(new cars GetVehiclePoolSize(); cars > -1cars--) 
if someone got 500 vehicle in his server, no need to loop the MAX_VEHICLES, because MAX_VEHICLES = 2000.
Also no need to use this
PHP Code:
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0); 
after using RepairVehicle(vehid); because it sets veh health to 1000 already.
In your cc command (clearchat)
No need to use
PHP Code:
for(new i250i++) 
because the chatbox gets only last 50 lines so just use this
PHP Code:
for(new 50> -1i--) 
Some of the above fixes are kinda useless, about looping I never faced any problem on looping with this way, but it will may be better with your way (I didn't try it)

I will may add some of your fixes in next version

Quote:
Originally Posted by eco1999
View Post
Good work man but please add multi language (turkish)
It is possible but I don't know Turkish language

Quote:
Originally Posted by Karan007
View Post
Nice one.
Thanks mate
Reply
#10

Awesome Work +REP
Reply
#11

Quote:
Originally Posted by Scripter18
Посмотреть сообщение
Awesome Work +REP
Thanks mate I repped you back
Reply
#12

Awesome SecretBoss. You were saying that you not gonna release that? and now? Btw REP+
Reply
#13

Quote:
Originally Posted by Humza
Посмотреть сообщение
Awesome SecretBoss. You were saying that you not gonna release that? and now? Btw REP+
Well, I decided to release it since there is no updated MySQL script in this forum, anyway thanks for rep
Reply
#14

Good job.
Reply
#15

The list you mention under "Functions" are not in a include but in the admin script.

It would really help people much to integrate their gamemode/other scripts with your admin script easily, if you provide an include with it. You can use PVars/SVars to access those vars from other platforms or use CallRemoteFunction (not necessary).
Reply
#16

Quote:
Originally Posted by Gammix
Посмотреть сообщение
The list you mention under "Functions" are not in a include but in the admin script.

It would really help people much to integrate their gamemode/other scripts with your admin script easily, if you provide an include with it. You can use PVars/SVars to access those vars from other platforms or use CallRemoteFunction (not necessary).
I totally I agree with you Gammix, but I don't have a lot experience with includes, I have already tried t implement an include and I am still working on it, it will may be implemented on upcoming versions
Reply
#17

Amazing work SecretBoss, Really I like your amazing works but you need to improve a bit in the functions and code parts.

Best Regards,
ShadyEG.
Reply
#18

Quote:
Originally Posted by ShadyEG
Посмотреть сообщение
Amazing work SecretBoss, Really I like your amazing works but you need to improve a bit in the functions and code parts.

Best Regards,
ShadyEG.
Hmmm thanks but what to improve?
Reply
#19

One simple suggestion,
How about adding /duty <=== allows admins to go on duty(and maybe admin on duties are immume to admin commands like /akill /jail, etc)
Reply
#20

Quote:
Originally Posted by xTURBOx
Посмотреть сообщение
One simple suggestion,
How about adding /duty <=== allows admins to go on duty(and maybe admin on duties are immume to admin commands like /akill /jail, etc)
There is already an immune system on the script, if a player's admin level is lower than the targets admin level then it will return an error

About duty system we can give unlimited health to admin (if he is on-duty)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)