How to Save Team by use dini
#5

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
*/
Reply


Messages In This Thread
How to Save Team by use dini - by colonel-top - 09.03.2013, 16:07
Re: How to Save Team by use dini - by FunnyBear - 09.03.2013, 16:17
Re: How to Save Team by use dini - by Da_Noob - 09.03.2013, 17:54
Re: How to Save Team by use dini - by colonel-top - 09.03.2013, 22:44
Re: How to Save Team by use dini - by Glad2BeHere - 09.03.2013, 23:18
Re: How to Save Team by use dini - by colonel-top - 10.03.2013, 08:24

Forum Jump:


Users browsing this thread: 2 Guest(s)