SA-MP Forums Archive
Teams/Factions - 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: Teams/Factions (/showthread.php?tid=444165)



Teams/Factions - FShiwani - 15.06.2013

Hello, I am making a RP Server, I wish to make factions and came across one thread which stated

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.

I am using LuxAdmin, it registers players and creates a file for them, how can I implement Luxadmin saving system into this. Luxadmin saves user files in scriptfiles/LuxAdmin/Accounts/PLAYERNAME.sav


Re: Teams/Factions - FShiwani - 16.06.2013

Any ideas?


Re: Teams/Factions - Mattakil - 16.06.2013

Does Luxadmin just save the admin stats? I would reccomend using YSI and writing it yourself, its not very hard


Re: Teams/Factions - FShiwani - 16.06.2013

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
Does Luxadmin just save the admin stats? I would reccomend using YSI and writing it yourself, its not very hard
Luxadmin saves details for all players, not just admins. I want to stick with LuxAdmin as I really prefer LuxAdmin.


Re: Teams/Factions - cray1100 - 09.08.2013

BUMP!!! I need this FAST!


Re: Teams/Factions - Originality - 09.08.2013

As stated above, you are honestly better writing it yourself than using a filterscript to do it for you. Also, use Y_INI - it is 45x faster than DINI.