17.12.2010, 16:07
Untill i update this script to actually save vehicles when a players exits your server no it will not be your own vehicle for now it simply spawns you a vehicle anyone can use.
Now to buy trucks and trailers you would need to add that in go under
and just add Under if(listitem == 7 )
And change "YourVehicleIDHere" to what ever vehicle you want to spawn.
And change "YourAmountGoesHEre" to set the price of the vehicle.
Once you have done that underneath the code you added is..
Now just change this
"if(listitem == 8 )" to "if(listitem == 9)"
This will put "back" at the bottom of the list and whatever vehicle you want above it.
Last thing is press (CTRL + F) and search for
After
put
And just replace "YourVehicleName" With the vehicle you want.
That should work if it doesnt let me know.
Now to buy trucks and trailers you would need to add that in go under
Quote:
if(dialogid == CARMENU+3) |
Quote:
if(listitem == 8 ) { if(GetPlayerMoney(playerid) > YourAmountGoesHere) { new CarOne; new CarOwnerName[24]; GetPlayerName(playerid,CarOwnerName,24); CarOne = CreateVehicle(YourVehicleIDHere, -1637.3981, 1211.3069, 6.8102, 225.1162, -1, -1, -1); GivePlayerMoney(playerid, -YourAmountGoesHere); PutPlayerInVehicle(playerid,CarOne,0); DialogActive[playerid]=0; ShowVehicleColor1(playerid); PurchasedCar[CarOne] = 999; } if (GetPlayerMoney(playerid) < YourAmountGoesHere) { SendClientMessage(playerid, 0xFF9900AA, "You Do Not Have Enough Money."); } |
And change "YourAmountGoesHEre" to set the price of the vehicle.
Once you have done that underneath the code you added is..
Quote:
if(listitem == 8 ) { ShowPlayerDialog(playerid,CARMENU,DIALOG_STYLE_LIS T, "Special Vehicle Showroom","Buy a Car\nBuy a Bike\nBuy a Special Vehicle","Select","exit"); } |
"if(listitem == 8 )" to "if(listitem == 9)"
This will put "back" at the bottom of the list and whatever vehicle you want above it.
Last thing is press (CTRL + F) and search for
Quote:
\nQuad Bike\nVortex\nBack", |
Quote:
\nVortex\nBack", |
Quote:
\nVortex\n"YourVehicleName"\nBack", |
That should work if it doesnt let me know.