17.06.2013, 14:04
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
LuxAdmin saves the account files not as .ini but as .sav, here is an example of a file
How can I use LuxAdmin saving system to implement a gTeam saving.
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. |
Код:
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