How to Save Team by use dini - 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: How to Save Team by use dini (
/showthread.php?tid=421453)
How to Save Team by use dini -
colonel-top - 09.03.2013
Hello Guys I have TDM Scripts And Im using gTeam
if i want to save team faction by
usse dini write.team files when playerdisconnect and loaded + setplayer to team when playerconnect
How to making it can someone help me pleasethankyou ...
Re: How to Save Team by use dini -
FunnyBear - 09.03.2013
Use Y_ini or MySQL
Re: How to Save Team by use dini -
Da_Noob - 09.03.2013
Quote:
Originally Posted by FunnyBear
Use Y_ini or MySQL
|
He asks how to do it with DINI, are you blind?
OT: I'd say you can make an enum where you can assign the player's team to, and then when a player disconnects you save it. I'm not going to give you a full code, but I think this can get you started.
Re: How to Save Team by use dini -
colonel-top - 09.03.2013
@Da_noob
Thank You I Will try do it with my self ^_^
Re: How to Save Team by use dini -
Glad2BeHere - 09.03.2013
pawn Код:
new Team[MAX_PLAYERS];// add somewhere at the top
/* saving using a variable */
new file[64], playername[32];
GetPlayerName(playerid, playername, sizeof(playername));
format(file, sizeof(file), "%s.ini", playername));
dini_IntSet(file, "Team", Team[playerid]);
/* Loading it */
//need to be called under a function
new file[64], playername[32];
GetPlayerName(playerid, playername, sizeof(playername));
format(file, sizeof(file), "%s.ini", playername));
Team[playerid] = dini_Int(file, "Team");
/*
explaining
now in commands or callbacks or w/e u wanna do all u need is "Team[playerid]" as the variable and it will get/save player team and do all that stuff u need 2 do via playerteam
*/
Re: How to Save Team by use dini -
colonel-top - 10.03.2013
Thank You
But Its Got Error T_T