Making an admin command which saves new coords in .pwn
#4

Here it is

pawn Код:
#define FILE "Coordinates.cfg"

CMD:coords(playerid, params[])
{
    new pos[3], str[96];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    format(str, sizeof(str), "%f %f %f", pos[0], pos[1], pos[2]);
    if(fexist(FILE))
    {
        fopen(FILE, io_write);
        fwrite(FILE, str);
        fclose(FILE);
    }
    return 1;
}
You can also do this with yini or dini
Reply


Messages In This Thread
Making an admin command which saves new coords in .pwn - by Zeus666 - 24.01.2018, 17:06
Re: Making an admin command which saves new coords in .pwn - by Zeus666 - 27.01.2018, 08:32
Re: Making an admin command which saves new coords in .pwn - by Inn0cent - 27.01.2018, 09:06
Re: Making an admin command which saves new coords in .pwn - by Unkovic - 27.01.2018, 09:34
Re: Making an admin command which saves new coords in .pwn - by Dayrion - 27.01.2018, 12:25
Re: Making an admin command which saves new coords in .pwn - by Sew_Sumi - 27.01.2018, 12:28

Forum Jump:


Users browsing this thread: 1 Guest(s)