Dini help
#1

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

https://sampwiki.blast.hk/wiki/GetPlayerFightingStyle
https://sampwiki.blast.hk/wiki/SetPlayerFightingStyle
Reply
#3

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

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

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
Reply
#5

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

why there is kneehead at back ?

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

bump

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


Forum Jump:


Users browsing this thread: 1 Guest(s)