24.05.2014, 03:27
(
Last edited by AiRaLoKa; 25/05/2014 at 12:30 AM.
Reason: UPDATE R2
)
Simple Admin System
MySQL R38 | SSCANF2 | ZCMD
Update (R2)MySQL R38 | SSCANF2 | ZCMD
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
I added two command to change the player's name and password!
- /changename [newname]
- /changepass [newpassword]
- First of all, you need to download my filterscript and all of plugins that written in the bottom of this thread.
- 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
- Paste the sas.amx to the filterscript's folder
- Paste all of plugins to the plugin's folder
- Import the database.sql to your MySQL database.
- And you are done!
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;
}
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;
}
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)
|
Filterscript
R2 :Solidfiles (recommended!)
R1 :Solidfiles (not recommended)
Plugins
sscanf
MySQL ( use the R38 )
Thank's For Reading!