get file in "new"
#1

hey I need help with this thing:
PHP код:
stock checkprice(playerid,vehicleid)
{
    new 
string[256];
    new 
FileUserFile fopen("vprices.ini"io_read);
    if (
UserFile)
    {
        new 
key[256] , val256 ];
        new 
Data[256];
        while (
fread(UserFile,Datasizeof(Data)))
        {
            
key ini_GetKeyData );
            
format(string,sizeof(string),"%s",vehicleid);
            if(
strcmp(key,string,true)==0) { val ini_GetValue(Data); pCarPrice[playerid] = strval(val); }
        }
        
fclose(UserFile);
    }
    
//pCarPrice[plaid] = dini_Int("vprices.cfg", id);
    
return 1;

I need to get the var of vehicle number that I will use by new vehicleid = strval(tmp);
in command and by the playerid that I will use like the new vehicleid
and the problem is that it gives me price 0 when in the file it's 500
can someone help me fix this stock?
Reply


Messages In This Thread
get file in "new" - by vladi866 - 01.06.2011, 09:28
Re: get file in "new" - by vladi866 - 01.06.2011, 10:36
Re: get file in "new" - by Lorenc_ - 01.06.2011, 10:42
Re: get file in "new" - by vladi866 - 01.06.2011, 11:02
Re: get file in "new" - by Ash. - 01.06.2011, 11:33
Re: get file in "new" - by vladi866 - 01.06.2011, 12:05
Re: get file in "new" - by Ash. - 01.06.2011, 12:34
Re: get file in "new" - by vladi866 - 01.06.2011, 12:54
Re: get file in "new" - by Ash. - 01.06.2011, 12:59
Re: get file in "new" - by vladi866 - 01.06.2011, 13:53

Forum Jump:


Users browsing this thread: 1 Guest(s)