SA-MP Forums Archive
[Include] [INC] ErroR's new generation user system [BUGS FIXES! V1.3!] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [INC] ErroR's new generation user system [BUGS FIXES! V1.3!] (/showthread.php?tid=140893)

Pages: 1 2


[INC] ErroR's new generation user system [BUGS FIXES! V1.3!] - erorcun - 10.04.2010

[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


Re: [FS&INC] ErroR's new generation user system [Coming soon] - gecatahh - 10.04.2010

Looks very very nice.... I will wait for it!


Re: [FS&INC] ErroR's new generation user system [Coming soon] - Carlton - 11.04.2010

This looks very interesting.


Re: [FS&INC] ErroR's new generation user system [Coming soon] - [HiC]TheKiller - 11.04.2010

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


Re: [FS&INC] ErroR's new generation user system [Coming soon] - Lorenc_ - 11.04.2010

holy shit im waiting


Re: [INC] ErroR's new generation user system [Coming soon] - erorcun - 11.04.2010

First screenshots:




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


Re: [INC] ErroR's new generation user system [Coming soon] - ineoncore - 16.04.2010

few weeks wow that a lot.


Re: [INC] ErroR's new generation user system [Coming soon] - Mc. B-Ko - 17.04.2010

Nice work.


Re: [INC] ErroR's new generation user system [Coming soon] - Roymer - 17.04.2010

LOL and the Link?


Re: [INC] ErroR's new generation user system [Coming soon] - ¤Adas¤ - 17.04.2010

It looks nice.


Re: [INC] ErroR's new generation user system [Coming soon] - russo666 - 17.04.2010

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

Oh god i want it


Re: [INC] ErroR's new generation user system [Coming soon] - SavageTR - 18.04.2010

Good work. ( Eline saglik vatandas )


Re: [INC] ErroR's new generation user system [Coming soon] - ineoncore - 18.04.2010

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

Any updated mate?


Re: [INC] ErroR's new generation user system [V1 RELEASED!] - erorcun - 01.05.2010

ErroR's new user system RELEASED!

Link added to first message.

Functions list updated.

It should add as include file.

Dini.inc required.



Re: [INC] ErroR's new generation user system [V1 RELEASED!] - park4bmx - 01.05.2010

Really Really nice


Re: [INC] ErroR's new generation user system [V1 RELEASED!] - SloProKiller - 01.05.2010

Awesome! Will be using this


Re: [INC] ErroR's new generation user system [V1 RELEASED!] - erorcun - 01.05.2010

Download link replaced.

Installation guide added.


Re: [INC] ErroR's new generation user system [V1.1 RELEASED!] - erorcun - 01.05.2010

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);




Re: [INC] ErroR's new generation user system [V1.1 RELEASED!] - Kenny_R - 01.05.2010

Good job man!:

Aferin lo


Re: [INC] ErroR's new generation user system [V1.1 RELEASED!] - Lorenc_ - 02.05.2010

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