SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 12/01/2011, 06:31 PM   #1
Zh3r0
High-roller
 
Join Date: Mar 2008
Posts: 4,510
Reputation: 398
Default Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

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 - http://forum.sa-mp.com/showthread.php?t=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:
http://forum.sa-mp.com/showthread.php?p=999063
__________________

Last edited by Zh3r0; 23/01/2011 at 10:25 AM.
Zh3r0 is offline   Reply With Quote
Old 12/01/2011, 06:32 PM   #2
WestTillIdie
Little Clucker
 
Join Date: Jan 2011
Posts: 11
Reputation: 0
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

great!
WestTillIdie is offline   Reply With Quote
Old 12/01/2011, 06:33 PM   #3
i3Cookies
Little Clucker
 
Join Date: Nov 2010
Posts: 24
Reputation: 0
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

Very nice!
i3Cookies is offline   Reply With Quote
Old 12/01/2011, 06:41 PM   #4
Grim_
High-roller
 
Grim_'s Avatar
 
Join Date: Sep 2008
Location: United States
Posts: 2,896
Reputation: 118
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

It's nice, but there's no need to make another topic just for a separate version.
Grim_ is offline   Reply With Quote
Old 12/01/2011, 07:39 PM   #5
Hal
High-roller
 
Hal's Avatar
 
Join Date: May 2010
Location: Toronto, Canada
Posts: 1,166
Reputation: 43
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

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

Wanna start a project thats NOT sa-mp with me? I have a bunch of server space, PM me.
Hal is offline   Reply With Quote
Old 12/01/2011, 09:52 PM   #6
Rzzr
Gangsta
 
Rzzr's Avatar
 
Join Date: Aug 2007
Location: Netherlands
Posts: 657
Reputation: 264
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

Nice FS Zh3r0, though I'd recommend you to hash passwords.
Rzzr is offline   Reply With Quote
Old 12/01/2011, 10:21 PM   #7
Haydz
Gangsta
 
Haydz's Avatar
 
Join Date: Jul 2010
Location: New Zealand
Posts: 752
Reputation: 44
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

This is nice, will hopefully help me fix my y_ini problem.
Haydz is offline   Reply With Quote
Old 13/01/2011, 08:03 AM   #8
DirtyLilFreak
High-roller
 
DirtyLilFreak's Avatar
 
Join Date: Aug 2010
Location: http://localhost Status: Active
Posts: 1,014
Reputation: 40
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

awesome xD
__________________

Underground GFX
Hmm Still got an Game-MP account what can I possibly do with it?
DirtyLilFreak is offline   Reply With Quote
Old 13/01/2011, 08:42 AM   #9
Brian_McCarthy
Little Clucker
 
Join Date: Mar 2008
Location: Crotia
Posts: 10
Reputation: 0
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

would've been better with the whirlpool hash but it's still bad ass tho
Brian_McCarthy is offline   Reply With Quote
Old 13/01/2011, 09:09 AM   #10
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,793
Reputation: 1179
Default Re: Login/Register using ZCMD SSCANF & Y_INI.( Admin commands + VIP System + VIP Commands! )

dude i was making one of these lol, great job love ur work zh3r0
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] B Admin Version 1.0.0 [Basic Commands, Auto Login, Register System, And more!] [SF]Bamdude37 Filterscripts 28 06/06/2011 06:32 PM
[FilterScript] Login/Register using ZCMD SSCANF & Y_INI. Zh3r0 Filterscripts 40 24/02/2011 02:16 PM
[FilterScript] Oadmin admin filterscript + (22 commands)+register and login system OmarEco Filterscripts 7 16/08/2010 12:52 PM
How can i add /register, /login and admin commands to my server? Xtreme4ever Help Archive 8 10/07/2010 05:38 PM
sscanf and zcmd question about commands with multi parameters Dujma Help Archive 3 21/11/2009 01:24 AM


All times are GMT. The time now is 12:16 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.