[Include] [INC] ErroR's new generation user system [BUGS FIXES! V1.3!]
#1

[INC] ErroR's new generation user system

Saves

Money
Score
Team*
Time*
Fight Style and Skills*
Drunk Level*
Wanted Level*
Weapons*
Health and Armour*
Position
Skin*

* = Optional

And you can add your own entries...

Features

-Optional callbacks

OnPlayerLogged(playerid,username[]) //Called after the login.
OnPlayerRegistered(playerid,username[]) // Called after the register.

-Usergroup System

Quote:

SetupUserSystem(mode, defaultusergroup, minpasssize, savetime, saveteam, savefightandskill, savedrunk, savewanted, saveweapon, savehealth, saveskin, failedloginthreshold);

GetMemberUsergroup(username[]);

ChangeMemberUsergroup(username[],usergroup);

-Fully customizable

Now that's easy to add additional entries.
The only thing you need to do, to put the AddIntInfo/AddFloatInfo/AddStringInfo command.

Example:
pawn Код:
public OnPlayerRegistered(playerid,username[])
{
new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
AddIntInfo(username,"phone",randphone);
return 1;
}
-Improved Auto Login

- Automatically removes invalid entries
- Quickly makes the login. Does not require additional processing.
- IP addresses and user names are stored in autologin.ini.

pawn Код:
SetAutoLogin(username[],ip[]);
RemoveAutoLogin(ip[]);
CheckAutoLogin(ip[]);
-Skill saving

Skill saving, first time in ErroR's user system.

Quote:

SetupUserSystem(mode, defaultusergroup, minpasssize, savetime, saveteam,savefightandskill, savedrunk, savewanted, saveweapon, savehealth, saveskin, failedloginthreshold)

-GUI mode

Quote:

SetupUserSystem(mode, defaultusergroup, minpasssize, savetime, saveteam, savefightandskill, savedrunk, savewanted, saveweapon, savehealth, saveskin, failedloginthreshold)

0 = GUI off
1 = GUI before spawn
2 = GUI after spawn

-Customizable stats saving

Quote:

forward SetupStatsSavingSystem(boolnplayerupdate,booln playerdisconnect,boolnplayerstatechange,timerint erval);

If you set timerinterval to 0, stats saving timer will not work.

Functions

pawn Код:
//###########// CALLBACKS //###############//
forward OnPlayerLogged(playerid,username[]);
forward OnPlayerRegistered(playerid,username[]);
 
//###########// SETUP //#################//
forward SetupUserSystem(mode, defaultusergroup, minpasssize, savetime, saveteam, savefightandskill, savedrunk, savewanted, saveweapon, savehealth, saveskin, failedloginthreshold); //modes: 0:gui system off 1:gui before spawn, 2:gui after spawn
forward SetupStatsSavingSystem(bool:onplayerupdate,bool:onplayerdisconnect,bool:onplayerstatechange,timerinterval);
 
//##########// ADDITIONAL FIELDS //##############//
forward AddIntInfo(username[],key[],value);
forward AddFloatInfo(username[],key[],Float:value);
forward AddStringInfo(username[],key[],value[]);
 
//##########// USER ADD & DELETE //###############//
forward RegisterMember(username[],password[]);
forward RegisterMemberByPlayer(playerid, username[],password[], autologin);
forward DeleteMember(username[]);
 
//##########// LOGIN & LOGOUT //###############//
forward Login(playerid,username[]);
forward Logout(playerid,bool:showlogindialog);
 
//##########// AUTO LOGIN //###############//
forward SetAutoLogin(username[],ip[]);
forward RemoveAutoLogin(ip[]);
//   CheckAutoLogin(ip[]);
 
//##########// GET INFO //###############//
forward GetMemberStatsInt(username[],statname[]);
//       GetMemberStatsFloat(username[],statname[]);
//       GetMemberStatsString(username[],statname[]);
forward GetMemberUsergroup(username[]);
//       GetMemberEncryptedPassword(username[]);
forward GetMemberPlayerID(username[]);
//       GetPlayerUsername(playerid);
forward IsPlayerLogged(playerid);
 
//##########// SET INFO //###############//
forward ChangeMemberName(oldname[],newname[]);
forward ChangeMemberPassword(username[],password[]);
forward ChangeMemberUsergroup(username[],usergroup);
forward SetMemberStatsInt(username[],statname[],value);
forward SetMemberStatsFloat(username[],statname[],Float:value);
forward SetMemberStatsString(username[],statname[],value[]);
Photos & Videos




Installation

1- Put to the top
pawn Код:
#include <usersystem>
2- Put to the OnGameModeInit and configure
pawn Код:
SetupUserSystem(mode, defaultusergroup, minpasssize, savetime, saveteam, savefightandskill, savedrunk, savewanted, saveweapon, savehealth, saveskin, failedloginthreshold); //modes: 0:gui system off 1:gui before spawn, 2:gui after spawn
SetupStatsSavingSystem(bool:onplayerupdate,bool:onplayerdisconnect,bool:onplayerstatechange,timerinterval);
SetupUserSystem function:

Mode = If you set to 0, gui will not work. If you set to 1, gui will appear before spawn, 2= gui will appear after spawn

Default User Group = Default user group while players was registering. I suggest to type 0.

Min pass size = I suggest to type 4.

Failed login threshold = This option sets invalid login limit. I suggest to type 3.

SetupStatsSavingSystem function:

On‌PlayerUpdate = If you set true, stats will be saved automaticly in onplayerupdate callback.
On‌PlayerDisconnect = If you set true, stats will be saved automaticly in onplayerdisconnect callback.
On‌PlayerStateChange = If you set true, stats will be saved automaticly in onplayerstatechage callback.
Timer Interval = If you enter a interval, stats will be saved automaticly with timer. If you set to 0, timer will not work.

Download V1.3

http://solidfiles.com/d/48f4/download/

[TUT]How to add additional entries in ErroR's registration system: http://forum.sa-mp.com/index.php?topic=171614.0

_________________________________________________
Sorry for my english
Reply
#2

Looks very very nice.... I will wait for it!
Reply
#3

This looks very interesting.
Reply
#4

Nice, but you probably should have waited to post this.
Reply
#5

holy shit im waiting
Reply
#6

First screenshots:




Currently, only the stats import system remained.
Skill saving system was completed today.
I will publish few weeks later.
Reply
#7

few weeks wow that a lot.
Reply
#8

Nice work.
Reply
#9

LOL and the Link?
Reply
#10

It looks nice.
Reply
#11

Quote:
Originally Posted by Roymer
LOL and the Link?
"Coming soon".

Oh god i want it
Reply
#12

Good work. ( Eline saglik vatandas )
Reply
#13

Quote:
Originally Posted by Roymer
LOL and the Link?
Next time read please.

Any updated mate?
Reply
#14

ErroR's new user system RELEASED!

Link added to first message.

Functions list updated.

It should add as include file.

Dini.inc required.
Reply
#15

Really Really nice
Reply
#16

Awesome! Will be using this
Reply
#17

Download link replaced.

Installation guide added.
Reply
#18

New version v1.1 released!

Many bug fixes and improved stats saving options!

After that, the statistic can be saved in onplayerstatechange callback or with timer.

Changed SetupStatsSavingSystem function:

Quote:

forward SetupStatsSavingSystem(boolnplayerupdate,booln playerdisconnect,boolnplayerstatechange,timerint erval);

Reply
#19

Good job man!:

Aferin lo
Reply
#20

Finally its out! I might use it for SAMP-ARENA and add a admin script on to it..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)