SA-MP Forums Archive
Dini help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dini help (/showthread.php?tid=241273)



Dini help - sMog. - 17.03.2011

How to make that this saves to "server/scriptfiles/Fightstyles/"

Код:
public OnPlayerConnect(playerid)
{
	SendClientMessage(playerid, COLOR_RED, "This server contains a system that allows you to choose a style for the fight, use /FightStyles to choose your!");

	GetPlayerName(playerid,pname,30);
    if(!dini_Exists(pname))
    	dini_Create(pname);
    else if(dini_Exists(pname))
    {
        FightStyle[playerid] = dini_Int(pname,"FightStyle");
	}
	
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	GetPlayerName(playerid,pname,30);
    dini_IntSet(pname,"FightStyle", FightStyle[playerid]);

	return 1;
}
I try to find fith search dini.inc but it gets other stuff... i can't find

Please help i hope this is easy


Re: Dini help - Stigg - 17.03.2011

https://sampwiki.blast.hk/wiki/GetPlayerFightingStyle
https://sampwiki.blast.hk/wiki/SetPlayerFightingStyle


Re: Dini help - Calgon - 17.03.2011

The FIRST parameter of the dini functions are files, example:

pawn Код:
dini_IntSet("server/scriptfiles/Fightstyles/File.txt", "Kneehead", 1);



Re: Dini help - sMog. - 17.03.2011

no it crates filer rightnow to scriptfiles folder
i want to create these to Scriptfiles/Fightstyles

if i open file there is FightStyle = 0 //Fightstyle id

i need to change just saveplace


Respuesta: Dini help - Code8976Man - 17.03.2011

pawn Код:
dini_IntSet("server/scriptfiles/Fightstyles.txt", "Kneehead", 1);



Re: Dini help - sMog. - 17.03.2011

why there is kneehead at back ?

rhis is my dini_IntSet(pname,"FightStyle", FightStyle[playerid]);


Re: Dini help - sMog. - 19.03.2011

bump

sorry for bump... i rememberd that bumb is 24h..