What am I doing wrong?[HELP ME]
#1

What is wrong with this script.....all it does is create a .ini file called pos.ini and puts in it pos=0

Код:
public OnPlayerDisconnect(playerid, reason)
{
    new file[128], pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, sizeof(pname));
	format(file, sizeof(file), "\\Positions\\%s.ini", pname);//leader the name of your folder in scriptfiles
	if(!dini_Exists(file))
	dini_Create(file);
	new Float:x, Float:y, Float:z;
	dini_IntSet(file, "Pos", GetPlayerPos(playerid, x, y, z));
	return 1;
}

public OnPlayerSpawn(playerid)
{
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Positions\\%s.ini", pname);//leader the name of your folder in scriptfiles
SetPlayerPos(playerid, dini_Int(file, "Pos"));
return 1;
}
Reply


Messages In This Thread
What am I doing wrong?[HELP ME] - by [JnA]DukeNukem - 22.12.2010, 05:43
Re: What am I doing wrong?[HELP ME] - by Grim_ - 22.12.2010, 05:47
Re: What am I doing wrong?[HELP ME] - by [JnA]DukeNukem - 22.12.2010, 05:54
Re: What am I doing wrong?[HELP ME] - by Grim_ - 22.12.2010, 05:57
Re: What am I doing wrong?[HELP ME] - by [JnA]DukeNukem - 22.12.2010, 05:58
Re: What am I doing wrong?[HELP ME] - by [JnA]DukeNukem - 22.12.2010, 06:05
Re: What am I doing wrong?[HELP ME] - by Grim_ - 22.12.2010, 06:07
Re: What am I doing wrong?[HELP ME] - by [JnA]DukeNukem - 22.12.2010, 06:12
Re: What am I doing wrong?[HELP ME] - by [JnA]DukeNukem - 22.12.2010, 06:15
Re: What am I doing wrong?[HELP ME] - by Grim_ - 22.12.2010, 06:18

Forum Jump:


Users browsing this thread: 5 Guest(s)