How to Save Team by use dini
#1

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 ...
Reply
#2

Use Y_ini or MySQL
Reply
#3

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.
Reply
#4

@Da_noob
Thank You I Will try do it with my self ^_^
Reply
#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
#6

Thank You But Its Got Error T_T
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)