mint3d Posted December 9, 2013 Posted December 9, 2013 Ok I was wondering if its posible to make a script that you can do like /hotdogs while in the hotdog van and it will make a marker so you can sell hotdogs burgers and soda or somthing anyhelp?
Castillo Posted December 9, 2013 Posted December 9, 2013 Yes, it's possible. addCommandHandler getPedOccupiedVehicle getElementModel createMarker onMarkerHit
mint3d Posted December 9, 2013 Author Posted December 9, 2013 Can you give me a start? is this right? function vehicle ( theVehicle, seat, theplayer) local id = getElementModel ( theVehicle ) if id == 588 then local vehicleName = getVehicleName ( theVehicle ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vehicle )
mint3d Posted December 9, 2013 Author Posted December 9, 2013 Sorry for double post but is this right? function vehicle ( theVehicle, seat, theplayer ) local id = getElementModel ( theVehicle ) if id == 588 then local vehicleName = getVehicleName ( theVehicle ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then outputChatBox ("type /hotdogs to sell food and drinks" , thePlayer ) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vehicle )
Castillo Posted December 9, 2013 Posted December 9, 2013 function vehicle ( theVehicle, seat ) local id = getElementModel ( theVehicle ) if ( id == 588 ) then if ( theVehicle ) then outputChatBox ( "type /hotdogs to sell food and drinks", source ) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vehicle )
mint3d Posted December 9, 2013 Author Posted December 9, 2013 Ok Solid I need help that checks if players in the van now when I /hotdogs how to do that bit? and how would I set price for the food?
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