[FilterScript] Simple Admin System [MySQL R38 | sscanf2 | ZCMD]
#1

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:
  • Player's Name
  • Player's Password
  • Player's Money
  • Player's Score
  • Player's Kill
  • Player's Deaths
  • Player's Admin Level
  • Player's VIP Level
Bonuses!
I added two command to change the player's name and password!
  • /changename [newname]
  • /changepass [newpassword]
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!
Reply
#2

Very nice
Reply
#3

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

thanks all...

EDIT:

Updated, see the post for the R2!
Reply
#5

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)