Help : How to read from file
#1

How do i read from an file ?
Please someone give me an example , i ned this for reading from account.
For example
pawn Код:
if (strcmp("/adpcj", cmdtext, true, 10) == 0)
    {
      if(PlayerInfo[playerid][AdminLevel] > 1)
        {
        new Float:ax, Float:ay, Float:az;
            GetPlayerPos(playerid, ax , ay , az);
            AddStaticVehicle(422 , ax , ay+3 , az , 0.0, 1, 1);
            SendClientMessage(playerid, COLOR_YELLOW, "PCJ addet");
            new pname[24], File:ftw=fopen("log.txt", io_append);
        GetPlayerName(playerid, pname, 24);
            format(string, 30, "Admin %s Addet an PCJ at x = %d , y = %d , z = %d",pname,ax,ay+3,az);
            fwrite(ftw, string);
            fclose(ftw);
        }
    }
    return 1;

}
It compiles fine , but when i try the command doesn't work , so , how do i read AdminLevel= x ? ( i'm intrested only in the x , x is an number )
This is not an GF script , it's an "blank" script.
Reply


Messages In This Thread
Help : How to read from file - by Dj_maryo1993 - 30.07.2009, 17:31
Re: Help : How to read from file - by James_Alex - 30.07.2009, 17:33
Re: Help : How to read from file - by Dj_maryo1993 - 30.07.2009, 17:56
Re: Help : How to read from file - by James_Alex - 30.07.2009, 17:58
Re: Help : How to read from file - by Dj_maryo1993 - 30.07.2009, 18:18
Re: Help : How to read from file - by James_Alex - 30.07.2009, 18:33
Re: Help : How to read from file - by Dj_maryo1993 - 30.07.2009, 19:40

Forum Jump:


Users browsing this thread: 1 Guest(s)