27.01.2014, 12:49
Код:
if (strcmp(cmd, "/savep", true)==0) { if (!IsPlayerAdmin(playerid)) return 1; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_ORANGE, "Usage: /savep name | \"\" will be auto added"); return 1; } new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); format(string, sizeof(string), "{\"%s\", {%0.2f, %0.2f, %0.2f}},", tmp, x+2, y, z); SaveToFile2("HuntCheckpoint",string); // you can change it... return SendClientMessage(playerid, -1, string); } else SendClientMessage(playerid, -1, "Error: You are not authorized to use that command!"); }