[FilterScript] Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )
#1

Register / Login System
Using ZCMD + SSCANF + Y_INI
NEW VERSION: 1.2

Information
I made this system for you guys to start learning about Y_Ini, I've seen many people asking about, how to read, how to write, how to do this, with Y_Ini, well now you guys got a good chance to start a look at the code and learn.

This was not made, for an official release, or for a proper usage, it as released most for the fact that you guys can now start learning some stuff. I added some basic admin comands and VIP commands, so guess what, there is an Admin system + VIP system added. It saves absolutelly everything, even if you are muted, it will save into your account. This is avaialable only since version 1.2, in 1.0 there was just the login and register commands.

You need...
Y_INI - http://forum.sa-mp.com/showthread.ph...ighlight=y_ini

ZCMD - http://forum.sa-mp.com/showthread.ph...highlight=zeex

SSCANF 2.0 - https://sampforum.blast.hk/showthread.php?tid=120356

Contents
  • - VIP System, from level 0 to level, see the VIP Commands bellow.
  • - Admin System, there are 4 levels, Member, Moderator, Administrator and Owner
  • - Login and register system.
  • - Saves many things, score, moneys, level, weather, time etc.
  • - You can learn from this alot, see how Y_Ini actually works.
  • - Some very smooth and pleasant colors.
  • - Saves player data on exit.
  • - Mute system, freeze and akill.
  • - Players can use /changepass [OLD] [NEW] to change the password( Old password will save in file )
  • - When player spawns( From request class ) his saved skins, weather etc, will be used.
  • - VIP members can spawn a personal Infernus and a personal NRG-500.
  • - Use the commands from /mycmds to set your weather, time and skin.

Admin Comands
Use in-game: /acmds and /arules For Admin commands and Admin rules!
  • Level 0 (Member)
    /myweather /mytime /myskin /login /register /stats
  • Level 1 (Moderator)
    /settime /setweather /sethealth /setarmour /heal /setmoney /setscore
  • Level 2 (Administrator)
    /akill /mute /unmute /freeze /unfreeze /kick /spawn
  • Level 3 (Owner)
    /gmx /ban

Vip Comands
Use in-game: /viphelp For VIP Commands( VIP Only command )
  • VIP Level 1[/color]
    /vipgod
  • VIP Level 2[/color]
    /vipgod /vipcargod
  • VIP Level 3[/color]
    /vipgod /vipcargod /vnrg /vinf

Screenshots
Sorry for the very low quality, but my Video card exploded on fire and i had to buy a crappy one...provisory


















Older version screenshots!









Instalation
WARNING: To make this work, you need a folder called "Accounts" without the "" of course, in your scriptfiles folder.
So it should be:
Code:
/scriptfiles/Accounts
Remember the 'A', a big capital A at the beggining.


Player File
This is how the file looks from inside!
Code:
NAME = (SRC)Zh3r0
PASSWORD = Pass123
REG_DATE = 19:17:21  11/1/2011
LAST_ON = 12/1/2011 at 20:35:24
MONEYS = 10856
SCORE = 34
KILLS = 4
DEATHS = 2
VIP_LEVEL = 0
LEVEL = 3
MY_SKIN = 14
MY_TIME = 0
MY_WEATHER = 9
OLD_PASSWORD = Ohaiooo
MUTED = 1
GOD = 1
CAR_GOD = 0
Credits
  • ****** - Y_Ini, SSCANF
  • Zeex - ZCMD
  • Dracoblue - Set, strreplace, pName, Encode, INI_Exist
  • Zh3r0 - Building up this system using the above functions...
  • Rock4life - Testing the commands!

Download
Download
Only pastebin for now. Mirrors accepted.
http://pastebin.com/KgpicKBc


Changing
In-game you will see this:
pawn Code:
#define Level0 "Member"
#define Level1 "Moderator"
#define Level2 "Administrator"
#define Level3 "Owner"
Change it to whatever you want.

If you want to check if player is an admin, or check the moneys, or VIP level, simply use the GetPVarInt and GetPVarString with the following var names:
(Exactly like this)
  • VIP Level - Get player's VIP level.
  • Level - Get player's Admin Level.
  • Moneys - Get player's money.
  • Score - Get player's score.
  • Time - Get player favorite time.
  • Weather - Get player favorite weather.
  • Skin - Get player favorite skin.
  • On - Get player's last on server date and time.
  • Kills - Get player's kills.
  • Deaths - Getplayer's deaths.
  • Muted - Check if player is muted or not.
  • God - Check if player god is enabled or not.
  • CGod - Check if vehicle god is enabled or not.
  • Date - Get player's registration date.
The above bolded words will be use this way:
pawn Code:
GetPVarInt( playerid, "Varname" )

//Another example
GetPVarInt( playerid, "Level") > 1 ) //Checks if player's level is higher than 1.

Enjoy this filterscript, you doa re allowed to change everything you want from inside of it, do whatever you want with it, but be a mature person and keep the credits. After all, it's a 1k line codeand it's my work, distributed freely also I'm allowing you to change everything inside.

Here is an older version of this:
https://sampforum.blast.hk/showthread.php?pid=999063#pid999063
Reply
#2

great!
Reply
#3

Very nice!
Reply
#4

It's nice, but there's no need to make another topic just for a separate version.
Reply
#5

I will take a look and see how y_ini works, and if it will be worth while to change from djson
Reply
#6

Nice FS Zh3r0, though I'd recommend you to hash passwords.
Reply
#7

This is nice, will hopefully help me fix my y_ini problem.
Reply
#8

awesome xD
Reply
#9

would've been better with the whirlpool hash but it's still bad ass tho
Reply
#10

dude i was making one of these lol, great job love ur work zh3r0
Reply
#11

Very nice dude can i have ur msn?
Reply
#12

Quote:
Originally Posted by AzTeCaS
Посмотреть сообщение
Very nice dude can i have ur msn?
It's in my profile but I'm not using it anymore.

And thanks for the comments!
Reply
#13

This is nice job.
I like it
Reply
#14

Thanks,

anybody please report bugs I can bet there are, i experienced some of them...but ....
Reply
#15

i found a bug when player Register then re connect need re register again!
Reply
#16

Quote:
Originally Posted by AzTeCaS
Посмотреть сообщение
i found a bug when player Register then re connect need re register again!
Not a bug, the foler does not exist.
Reply
#17

Awesome, but maybe a hash?
Reply
#18

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
Awesome, but maybe a hash?
That can be done easily by using the whirlpool topic...
Reply
#19

i'm getting this error when i try to compile this.

GTA SA MP Server\filterscripts\reg_sys.pwn(4) : fatal error 100: cannot read from file: "ZCMD"
Reply
#20

Quote:
Originally Posted by MEC
Посмотреть сообщение
i'm getting this error when i try to compile this.

GTA SA MP Server\filterscripts\reg_sys.pwn(4) : fatal error 100: cannot read from file: "ZCMD"
Get ZCMD include and put it into pawn/includes
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)