SA-MP Forums Archive
Saving System with Faction and LuxAdmin - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Saving System with Faction and LuxAdmin (/showthread.php?tid=444600)



Saving System with Faction and LuxAdmin - FShiwani - 17.06.2013

Hello,
I am currently using LuxAdmin, it also has a player save system with many features, it is lacking one feature that is Faction implementation, I have created a faction system in my gamemode script. I am following this faction guide https://sampforum.blast.hk/showthread.php?tid=107762

Quote:

4. If your server does not have a saving system don't even bother with this step. I'm not explaining, how to create on, but how to use one. Now if you want players to change teams constantly such as a protect the president or a team DM server then this step is not important. This Step is geared more toward RP servers. What ever save system you have, under register make a new saving component, and make it team, or faction or w/e. On the login command were you can see the stats loading up, add the team one you made above, and make it like this.

pawn Code:
gTeam[playerid] = /* Your Save file for team */

Under OnPlayerDisconnect, you can make the save updating command. I use a dini saving system so here is an example.

Under OnPlayerDissconnect...
pawn Code:
dini_IntSet(file, team, gTeam[playerid]);
That function will take the players gTeam variable and save it on the players file. Then load it back up when they log in.

LuxAdmin saves the account files not as .ini but as .sav, here is an example of a file

Код:
Password=-----------------------------------------------------------
Ip=127.0.0.1
Registered=1
RegisteredDate=10/3/2013
Loggedin=0
Banned=0
Level=10
AccountType=3
LastOn=17.6.2013
Money=25062
Kills=0
Deaths=5
WantedLevel=0
Hours=3
Minutes=24
Seconds=37
NoQuestion=0
Question=----------------------------------
QuestionR=-------------------------------------------
x1=1478
y1=-2444
z1=13
interior1=0
Weapon1=0
Weapon1Ammo=0
Weapon2=0
Weapon2Ammo=0
Weapon3=0
Weapon3Ammo=0
Weapon4=0
Weapon4Ammo=0
Weapon5=0
Weapon5Ammo=0
Weapon6=0
Weapon6Ammo=0
Health=100
Armour=0
TimesOnServer=22
gTeam=1
How can I use LuxAdmin saving system to implement a gTeam saving.


Re: Saving System with Faction and LuxAdmin - cray1100 - 09.08.2013

BUMP!!! I need this QUICK!


Re: Saving System with Faction and LuxAdmin - ikbenremco - 09.08.2013

Show us we're you define file.


Re: Saving System with Faction and LuxAdmin - cray1100 - 11.08.2013

What file am i defining... I dont have anything defined for this... I dont even know how to add this to luxadmin, thats why i am here... Im tired of the players having to choose their team each time they login... PLEASE HELP...?