SA-MP Forums Archive
DINI problem ! not working - 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: DINI problem ! not working (/showthread.php?tid=389997)



DINI problem ! not working - Amine_Mejrhirrou - 04.11.2012

hello all
i have created some dini files for the players stats and and other dini folder with dini file for FACTIONS ! actualy it's 3 factions !
but it's not working (the FACTIONS dini)
this is how the cmd has been scripted !
Код:
	if ( strcmp( cmd, "/dfaction", true )== 0)//testdealers
    {
		new mmm;
		new tmp[256];
		tmp = strtok(cmdtext, idx);
		mmm = strval(tmp);
		if(!strlen(tmp)) return SendClientMessage(playerid, DENN, "[SERVER] Usage: /dfaction [Money]");
		if(mmm <= 0) return SendClientMessage(playerid, DENN, "[SERVER] Usage: /dfaction [Money]");
        if(team[playerid] == 3)//FACTION 3
        {
        	format(file, sizeof(file), FACTION_FILE, D);
        	dini_IntSet(file, "BANK", dini_Int(file, "BANK")+mmm);
		    new string[80];
		    format(string, sizeof(string), "[SERVER] You have Deposit %d in your FACTION ACCOUNT.", mmm );
		    return SendClientMessage(playerid, ACC, string);
		}
        if(team[playerid] == 4)//FACTION 4
        {
        	format(file, sizeof(file), FACTION_FILE, U);
        	dini_IntSet(file, "BANK", dini_Int(file, "BANK")+mmm);
		    new string[80];
		    format(string, sizeof(string), "[SERVER] You have Deposit %d in your FACTION ACCOUNT.", mmm );
		    return SendClientMessage(playerid, ACC, string);
		}
        if(team[playerid] == 5)//FACTION 5
        {
        	format(file, sizeof(file), FACTION_FILE, S);
        	dini_IntSet(file, "BANK", dini_Int(file, "BANK")+mmm);
		    new string[80];
		    format(string, sizeof(string), "[SERVER] You have Deposit %d in your FACTION ACCOUNT.", mmm );
		    return SendClientMessage(playerid, ACC, string);
		}
        else return SendClientMessage(playerid, DENN, "[SERVER] You are not in a faction");
    }