16.07.2011, 23:31
I have no errors but It's not working good.
The Script
Where Ive Transted Vehicle Costs: It's Write the folder That the value "Price" in, The *ini File, And not the Cost...
It's Showing it: Users/Cars/CarID%d.ini
Buy it need to show it: <Vehicle cost> the Line of: Price=<Price>
HELP?!!!!?!!!!
The Script
pawn Код:
/* Top of Script */
#define CarPrice dini_Int(vFile(vehicleid),"Price")
/////////////////////
/* Somewhere in a command...
if(!strcmp(cmd,"/buyable",true))
{
// There are some UnImportent Funtions....Here...
if(strlen(tmp) == 0) return SendClientMessage(playerid, red, "/buyable **[Price]**");
new PriceD = strval(tmp);
if(dini_Int(vFile(vehicleid),"rCar") != 0)
{
dini_IntSet(vFile(vehicleid),"Price",PriceD);
}
if(dini_Int(vFile(vehicleid),"sCar") != 0)
{
dini_IntSet(vFile(vehicleid),"Price",PriceD*2);
}
// More Functions....
return 1;
}
/* The Command */
if(!strcmp(cmd,"/car",true))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"аъд ма редв бшлб");
if(dini_Exists(vFile(vehicleid)) && dini_Int(vFile(vehicleid),"adminCar") != 1 && strcmp(dini_Get(vFile(vehicleid), "CarOwner"), "None", true) != 0 && dini_Int(vFile(vehicleid),"sCar") != 0) return SendClientMessage(playerid, red, "шлб жд фший еаъд ма йлем мшаеъ аъ дойгт щме");
if(dini_Exists(vFile(vehicleid)) && dini_Int(vFile(vehicleid),"adminCar") != 1 && dini_Int(vFile(vehicleid),"sCar") == 0 && strcmp(dini_Get(vFile(vehicleid), "CarOwner"), "None", true) != 0) return SendClientMessage(playerid, red, "шлб жд фший еаъд ма йлем мшаеъ аъ дойгт щме");
if(dini_Exists(vFile(vehicleid)) && dini_Int(vFile(vehicleid),"adminCar") != 0) return SendClientMessage(playerid, red, "мшлб жд айп ойгт");
if(!dini_Exists(vFile(vehicleid))) return SendClientMessage(playerid, red, "мшлб жд айп ойгт");
new title[128];
new l1[128];
new l2[128];
format(title, sizeof(title), "---------------------- [%s] ойгт тм шлб------------------------", VehNames[GetVehicleModel(vehicleid)-400]);
format(l1, sizeof(l1), "озйш дшлб: {FFFFFF} %s", CarPrice); // Translation: Vehicle Costs:
format(l2, sizeof(l1), "щм дшлб ID: {FFFFFF} %s", vehicleid);
SendClientMessage(playerid, orange, title);
SendClientMessage(playerid, 0x33CCCC00, l1);
if(dini_Int(vFile(vehicleid),"sCar") != 0) SendClientMessage(playerid, 0x33CCCC00, "сев шлб: {FFFFFF}Special - ойезг");
if(dini_Int(vFile(vehicleid),"sCar") == 0) SendClientMessage(playerid, 0x33CCCC00, "сев шлб: {FFFFFF}Regular - швйм");
SendClientMessage(playerid, 0x33CCCC00, l2);
return 1;
}
It's Showing it: Users/Cars/CarID%d.ini
Buy it need to show it: <Vehicle cost> the Line of: Price=<Price>
HELP?!!!!?!!!!