08.07.2012, 12:43
Hello folks,
Today i tried to integrate Cali-Cars: Advanced vehicle ownership! in the SFCRRPG script i'm using...
But i can't get it to work properly.
If you buy a car, it does spawn it, but when i /park it, and the vehicle respawns (ex: explosion), it does not respawn, or respawn at the dealership (depends what i try, in the script), but i can't get it to spawn at the last /park location.
Also, it does not remove any money from the player, who buys a vehicle.
Here is some of my code:
This is the code where the player buys the vehicle (Its in a dialog)
If you need more code to help me out, i'll get it ASAP.
Today i tried to integrate Cali-Cars: Advanced vehicle ownership! in the SFCRRPG script i'm using...
But i can't get it to work properly.
If you buy a car, it does spawn it, but when i /park it, and the vehicle respawns (ex: explosion), it does not respawn, or respawn at the dealership (depends what i try, in the script), but i can't get it to spawn at the last /park location.
Also, it does not remove any money from the player, who buys a vehicle.
Here is some of my code:
pawn Код:
GivePlayerMoney(playerid,-79500);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You have purchased an Infernus from Otto's Cars for $79500.");
dini_Create(file);
VehicleInfo[playerid][Model] = 411;
VehicleInfo[playerid][Price] = 79500;
VehicleInfo[playerid][CarX] = -1649.8687;
VehicleInfo[playerid][CarY] = 1218.8984;
VehicleInfo[playerid][CarZ] = 7.0115;
VehicleInfo[playerid][CarRot] = 224.3334;
Vehicle[playerid] = CreateVehicle(411,VehicleInfo[playerid][CarX],VehicleInfo[playerid][CarY],VehicleInfo[playerid][CarZ],VehicleInfo[playerid][CarRot],VehicleInfo[playerid][colora],VehicleInfo[playerid][colorb],3600000);
VehicleInfo[Vehicle[playerid]][bought] =playerid;
gPlayerHasCar[playerid] = 1;
RemovePlayerFromVehicle(playerid);
OwnerID[Vehicle[playerid]] = playerid;
VehPlate[Vehicle[playerid]] = "XYZR 000";
PutPlayerInVehicle(playerid, Vehicle[playerid], 0);
If you need more code to help me out, i'll get it ASAP.