29.04.2010, 21:54
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; }