// With comment hax. public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/_save",true)==0) { new Float:x, Float:y, Float:z, Float:a; new string[256]; new File: file = fopen("debug.txt", io_append); GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); format(string, sizeof(string), "AddPlayerClass(1, %.3f, %.3f, %.3f, %.3f, 0, 0, 0, 0, 0); // %s \r\n", x, y, z, a, cmdtext[7]); SendClientMessage(playerid, 0xFFFFFFAA, "Position saved to file \"scriptfiles\\debug.txt\"."); SendClientMessage(playerid, 0xFFFFFFAA, string); if(file) { fwrite(file, string); fclose(file); print(string); } else { print("Failed to create the file \"debug.txt\".\n"); } return 1; } return 0; } // Without comment hax public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/_save",true)==0) { new Float:x, Float:y, Float:z, Float:a; new string[256]; new File: file = fopen("debug.txt", io_append); GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); format(string, sizeof(string), "AddPlayerClass(1, %.3f, %.3f, %.3f, %.3f, 0, 0, 0, 0, 0); \r\n", x, y, z, a); SendClientMessage(playerid, 0xFFFFFFAA, "Position saved to file \"scriptfiles\\debug.txt\"."); SendClientMessage(playerid, 0xFFFFFFAA, string); if(file) { fwrite(file, string); fclose(file); print(string); } else { print("Failed to create the file \"debug.txt\".\n"); } return 1; } return 0; }