01.03.2011, 12:53
I know it is possible but I have no knownledge about how to add a comment after every command?
Example: /savepos Gate one
and adds in file.txt "838.722351, -1222.245483, 16.499397 //Gate one"
Wondering if someone could help me with this.
Example: /savepos Gate one
and adds in file.txt "838.722351, -1222.245483, 16.499397 //Gate one"
Wondering if someone could help me with this.
pawn Код:
if (strcmp(cmdtext, "/savepos", true)==0)
{
new string[128];
new Float:X, Float:Z, Float:Y;
GetPlayerPos(playerid, X, Y, Z);
SendClientMessage(playerid,COLOR_GREEN,"Player Pos Should Be Saved. With comment: [...]");
new File:pos=fopen("SavedPos.log", io_append);
format(string, sizeof(string), "%f, %f, %f\r\n", X, Y, Z);
fwrite(pos, string);
fclose(pos);
return 1;
}

