stock checkprice(playerid,vehicleid)
{
new string[256];
new File: UserFile = fopen("vprices.ini", io_read);
if (UserFile)
{
new key[256] , val[ 256 ];
new Data[256];
while (fread(UserFile,Data, sizeof(Data)))
{
key = ini_GetKey( Data );
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;
}
you don't know anything to help me beside saying stupid things?
|
else if(!strcmp(x_v, "getprice",true))
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmi] >= 5000)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"[USAGE]: /getprice [vehiclemodel]");
return 1;
}
new vehicleid = strval(tmp);
checkprice(playerid,vehicleid);
format(string, sizeof(string), "%s's price is $%d ", VehicleNames[vehicleid-400],pCarPrice[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string);
pCarPrice[playerid] = 0;
return 1;
}
}
return 1;
}