07.10.2011, 17:36
hi, I read a admin system tut with dini
but its freakin badly explained... there's no good tutorial on how to use dini for the first time... I do not get how you guys learned it...
anyways heres my code::
it should count the amount of times that u picked up the pickup but it does not work, I keep oin getting the message that I joined the tam 0 times even if ijoined it twice...
also in my scriptfiles folder no new folder gets created...
but its freakin badly explained... there's no good tutorial on how to use dini for the first time... I do not get how you guys learned it...
anyways heres my code::
pawn Код:
if(pickupid == driverpickupspawn)
{
new Dstat[128];
new name[MAX_PLAYER_NAME], string[500];
GetPlayerName(playerid, name, sizeof(name));
format(Dstat,sizeof(Dstat),"/spelers/%s.ini",name);
if(!fexist(Dstat))
{
dini_Create(Dstat);
dini_IntSet(Dstat,"Driver", 0);
format(string, sizeof(string), "Joined this team already: %d times!",pInfo[playerid][pDrivJoins]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else
{
pInfo[playerid][pDrivJoins] = dini_Int(Dstat, "Driver");
dini_IntSet(Dstat,"Driver", pInfo[playerid][pDrivJoins] + 1);
format(string, sizeof(string), "Joined this team already: %d times!",pInfo[playerid][pDrivJoins]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
also in my scriptfiles folder no new folder gets created...