Jump to content

Vehicle Shop HELP!


Xwad

Recommended Posts

  
function scriptCreateFBITruck ( player, command ) local luckyBugger = getRandomPlayer() -- get a random player local x, y, z = getElementPosition ( luckyBugger ) -- retrive the player's position createVehicle ( 601, x, y, z + 10 )  outputChatBox ( "You got vehicle!", luckyBugger )  
 addCommandHandler ( "tank",scriptCreateFBITruck  
  

Link to comment

Do you want to just create a car and warp him in it?

If so:

function vehicleFBITruck() 
if ( getPlayerMoney (source) >= 3000 ) then 
takePlayerMoney(source, 3000) 
outputChatBox("You have bought Sd.Kfz.222 vehicle.",source) 
local x,y,z = getElementPosition(source) 
local veh = createVehicle(601,x,y,z+5) 
warpPedIntoVehicle(source, veh) 
else 
outputChatBox('You dont have enough money to buy this Vehicle.', source, 255, 0, 0 ) 
end 
end 
addEvent("onVehicleBought", true) 
addEventHandler("onVehicleBought", getRootElement(), vehicleFBITruck) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...