27.01.2014, 12:58
pawn Код:
CMD:savep(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Error: You are not authorized to use that command!");
if(isnull(params))
{
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}},", params, x+2, y, z);
SaveToFile2("HuntCheckpoint",string); // you can change it...
return SendClientMessage(playerid, -1, string);
}