SA-MP Forums Archive
[FilterScript] Simple Admin System [MySQL R38 | sscanf2 | ZCMD] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple Admin System [MySQL R38 | sscanf2 | ZCMD] (/showthread.php?tid=514926)



Simple Admin System [MySQL R38 | sscanf2 | ZCMD] - AiRaLoKa - 24.05.2014

Simple Admin System
MySQL R38 | SSCANF2 | ZCMD
Update (R2)

Introduction

Hi all... Today i'm very bored... I have no idea what to do. So i make this filterscript. This is a very simple filterscript, i don't know is it work or not. My localhost is not worked for a long time (that's why i'm very bored). I didn't test it, but i think it will work 100 %.

Info

This filterscript can safe player's data (i only add some data, you can add it later). By default: Bonuses!
I added two command to change the player's name and password!
How to Install
  1. First of all, you need to download my filterscript and all of plugins that written in the bottom of this thread.
  2. After you downloaded the filterscript all of plugins, add these line on the server.cfg
    PHP Code:
    filterscript sas
    //and
    plugins sscanf mysql // for windows
    //or
    plugins sscanf.so mysql.so // for linux 
  3. Paste the sas.amx to the filterscript's folder
  4. Paste all of plugins to the plugin's folder
  5. Import the database.sql to your MySQL database.
  6. And you are done!
How to add admin only command

Simply add these line
pawn Code:
CMD:yourcomand(playerid, params[])
{
    if(pInfo[playerid][pAdminLevel] >= 1) // it mean if player's admin level is 1 or above, it will continue the command
    {
        //command
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "[ERROR]: You are not administrator!"); // if player's admin level is under 1, it will send a message to player and discard the command
    return 1;
}
How to add VIP only command

Not far from admin only command, you only need to add these line
pawn Code:
CMD:yourcomand(playerid, params[])
{
    if(pInfo[playerid][pVipLevel] >= 1) // it mean if player's VIP level is 1 or above, it will continue the command
    {
        //command
    }
    else return SendClientMessage(playerid, 0xFF0000FF, "[ERROR]: You are not VIP!"); // if player's VIP level is under 1, it will send a message to player and discard the command
    return 1;
}
Credits

SA-MP Team - For the SAMP
AiRaLoKa - For the whole script
BlueG - For the MySQL plugin
****** - For the sscanf2
ZeeX - For the zcmd

Changelog

Quote:

R2: (25/05/2014)
  • Fixed player's statistic won't save
  • Added SendDeathMessage at OnPlayerConnect
  • Added SendDeathMessage at OnPlayerDeath
R1: (24/05/2014)
  • Writed the whole script from the beginning
Download

Filterscript

R2 :Solidfiles (recommended!)
R1 :Solidfiles (not recommended)

Plugins

sscanf
MySQL ( use the R38 )

Thank's For Reading!


Re: Simple Admin System [MySQL R38 | sscanf2 | ZCMD] - AviPeker - 24.05.2014

Very nice


Re: Simple Admin System [MySQL R38 | sscanf2 | ZCMD] - APEXGames - 24.05.2014

Pretty awesome, I'll take a look at that IG.


Re: Simple Admin System [MySQL R38 | sscanf2 | ZCMD] - AiRaLoKa - 24.05.2014

thanks all...

EDIT:

Updated, see the post for the R2!


Re: Simple Admin System [MySQL R38 | sscanf2 | ZCMD] - NoSoap - 25.05.2014

Yeah not bad, neatly presented in the thread too, thanks for sharing.


Re: Simple Admin System [MySQL R38 | sscanf2 | ZCMD] - AiRaLoKa - 25.05.2014

Quote:
Originally Posted by NoSoap
View Post
Yeah not bad, neatly presented in the thread too, thanks for sharing.
you're welcome