Xwad Posted February 17, 2015 Author Posted February 17, 2015 no i had a code that gives a car i make it again.
Xwad Posted February 18, 2015 Author Posted February 18, 2015 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
Xwad Posted February 18, 2015 Author Posted February 18, 2015 no thats not the cood code this is very bad code
JR10 Posted February 18, 2015 Posted February 18, 2015 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)
Xwad Posted February 18, 2015 Author Posted February 18, 2015 Yeees i want to do that but i wrote the wrong code. I made this but i wrote getPedintoVehicle and thats why it does not work. But Thanks man!
Xwad Posted February 18, 2015 Author Posted February 18, 2015 it works! And thanks again for your help!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now