Command not working
#1

Hi there, it`s kinda late to me so I`m going to post it fast. I made a simple /save command which saves your postion and rotationa angle into a .ini file. The only problem is that when I do /save it does .... NUTHING.... maybe I`m just too tired to find the issues. If you can help, I would be very grateful

Код:
dcmd_save(playerid, params[])
{
	#pragma unused params
	new Float:x, Float:y, Float:z, Float:a, string[128], file[128], pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, sizeof(pname));
	GetPlayerPos(playerid, x, y, z);
	GetPlayerFacingAngle(playerid, a);
	format(string, sizeof(string), "%f, %f, %f, %f", x, y, z, a);
	format(file, sizeof(file), "\\Misc\\%s.ini", pname);
	if(!dini_Exists(file))
	{
		dini_Create(file);
		dini_Set(file, "position", string);
		SendClientMessage(playerid, COLOUR_RED, "Position saved!");
		return 1;
	}
	else
	{
		dini_Set(file, "position", string);
		SendClientMessage(playerid, COLOUR_RED, "Position saved!");
		return 1;
	}
 	return 1;
}
Reply


Messages In This Thread
Command not working - by sobolanux - 29.04.2010, 21:54
Re: Command not working - by Hiddos - 29.04.2010, 22:02
Re: Command not working - by Backwardsman97 - 30.04.2010, 01:49
Re: Command not working - by sobolanux - 30.04.2010, 08:18
Re: Command not working - by Torran - 30.04.2010, 08:23

Forum Jump:


Users browsing this thread: 1 Guest(s)