SA-MP Forums Archive
[Help] CarShop System (VehicleCoast Is not working) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] CarShop System (VehicleCoast Is not working) (/showthread.php?tid=646398)



[Help] CarShop System (VehicleCoast Is not working) - Fletcher007 - 16.12.2017

Init
//CARSHOP FUNCTIONS AND CONFIGURATION?
CreateCarshopGlobalTD();
CreateCarshopCar(522,-395.9633,1264.1262,6.7897,184.2291, 11000); //Vehice id, Cords and coast (11000)
Код:
/* CARSHOP SYSTEM */
stock CreateCarshopCar(modelid, Float:carsX, Float:carsY, Float:carsZ, Float:carsA, price)
{
	CarshopCars++;
	CarShop_I[CarshopCars][carshopID] = CarshopCars;
	CarShop_I[CarshopCars][carshopModel] = modelid;
	CarShop_I[CarshopCars][carshopPrice] = price;
	CarShop_I[CarshopCars][carshopVehicle] = CreateVehicle(modelid, carsX, carsY, carsZ, carsA, -1, -1, 100);
	printf("ID- %d CARSHOPVEHICLE", CarShop_I[CarshopCars][carshopVehicle]);
	return 1;
}
///////////////////
stock SetCarshopCarPriceForTD(playerid, carshopvalue)
{
	new scscpft[32];
	format(scscpft, sizeof(scscpft), "%d$", carshopvalue);
	PlayerTextDrawSetString(playerid, CarshopPTD[playerid][1], scscpft);
}



Re: [Help] CarShop System (VehicleCoast Is not working) - RogueDrifter - 16.12.2017

Quote:
Originally Posted by Fletcher007
Посмотреть сообщение
Init
//CARSHOP FUNCTIONS AND CONFIGURATION?
CreateCarshopGlobalTD();
CreateCarshopCar(522,-395.9633,1264.1262,6.7897,184.2291, 11000); //Vehice id, Cords and coast (11000)
Код:
/* CARSHOP SYSTEM */
stock CreateCarshopCar(modelid, Float:carsX, Float:carsY, Float:carsZ, Float:carsA, price)
{
	CarshopCars++;
	CarShop_I[CarshopCars][carshopID] = CarshopCars;
	CarShop_I[CarshopCars][carshopModel] = modelid;
	CarShop_I[CarshopCars][carshopPrice] = price;
	CarShop_I[CarshopCars][carshopVehicle] = CreateVehicle(modelid, carsX, carsY, carsZ, carsA, -1, -1, 100);
	printf("ID- %d CARSHOPVEHICLE", CarShop_I[CarshopCars][carshopVehicle]);
	return 1;
}
///////////////////
stock SetCarshopCarPriceForTD(playerid, carshopvalue)
{
	new scscpft[32];
	format(scscpft, sizeof(scscpft), "%d$", carshopvalue);
	PlayerTextDrawSetString(playerid, CarshopPTD[playerid][1], scscpft);
}
How's it not working? from what i'm seeing it should work you can not just post code and say it doesnt work explain more and provide more info.


Re: [Help] CarShop System (VehicleCoast Is not working) - Fletcher007 - 16.12.2017

The code cannot save car prices example Sultan 10.000$ And Elegy 5.000$ when u are going to buy sultan car price make changes Sultan 5.000$ like that, S2 for bed english


Re: [Help] CarShop System (VehicleCoast Is not working) - AlexMSK - 16.12.2017

Try changing this
new scscpft[32];


Re: [Help] CarShop System (VehicleCoast Is not working) - Fletcher007 - 16.12.2017

Same problem