[HELP] /savepos command
#10

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.


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;
}
Reply


Messages In This Thread
[HELP] /savepos command - by Rolyy - 01.03.2011, 11:47
Re: [HELP] /savepos command - by Hashski - 01.03.2011, 11:52
Re: [HELP] /savepos command - by Rolyy - 01.03.2011, 11:53
Re: [HELP] /savepos command - by Hashski - 01.03.2011, 11:55
Re: [HELP] /savepos command - by Rolyy - 01.03.2011, 12:00
Re: [HELP] /savepos command - by Rolyy - 01.03.2011, 12:05
Re: [HELP] /savepos command - by HyperZ - 01.03.2011, 12:40
Re: [HELP] /savepos command - by Rolyy - 01.03.2011, 12:46
Re: [HELP] /savepos command - by HyperZ - 01.03.2011, 12:47
Re: [HELP] /savepos command - by Rolyy - 01.03.2011, 12:53

Forum Jump:


Users browsing this thread: 1 Guest(s)