Not saving properly
#1

pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/sethousepos", cmdtext, true, 10) == 0)
    {
      new file[256];
    new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        new File:properties = fopen("/properties.cfg", io_write);
    format(file, sizeof file, "HousePos: %d\n,%d\n,%d\n",x, y, z);
        {   fwrite(properties, file); }
    fclose(properties);
        return 1;
    }
    return 0;
}
Thats my code: This is properties.cfg

Код:
HousePos: 1122473179
,-1033036543
,1070202880
And well how do i get it to read from that file and set the players position?
Also if i was to example: [houseeterx],[houseentery][houseeterz][houseexitx][houseexity][houseexitz]
How would i get it to read which bits housexit, and which bit is house enter,

edit: sorry about the name it was originally for the coords not saving properly but i have fixed that
Reply


Messages In This Thread
Not saving properly - by Torran - 10.02.2010, 17:22
Re: Not saving properly - by Joe Staff - 10.02.2010, 17:24
Re: Not saving properly - by Torran - 10.02.2010, 17:26
Re: Not saving properly - by MadeMan - 10.02.2010, 18:15
Re: Not saving properly - by Torran - 10.02.2010, 18:20
Re: Not saving properly - by MadeMan - 10.02.2010, 18:27
Re: Not saving properly - by Torran - 10.02.2010, 18:30
Re: Not saving properly - by MadeMan - 10.02.2010, 18:36
Re: Not saving properly - by Torran - 10.02.2010, 18:48
Re: Not saving properly - by MadeMan - 10.02.2010, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)