hDavidm Posted November 18, 2013 Posted November 18, 2013 i have wanted to make a resource like this:when i enter in a vehicle on the list the "moto" clothing shold be added local VEH = { 581, 509, 481, 462, 521, 463, 510, 522, 461, 448, 468, 586 } function onEnterVehicle ( theVehicle, seat, jacked, VEH ) if getElementModel ( theVehicle ) == ("VEH") then addPedClothes ( source, "moto", "moto", 16 ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onEnterVehicle ) function onExitVehicle ( theVehicle, seat, jacked,VEH ) if getElementModel ( theVehicle ) == ("VEH") then removePedClothes ( source, 16 ) end end addEventHandler ( "onPlayerVehicleExit", getRootElement(), onExitVehicle ) can someone help me to fix it? (i used wiki examples)
Castillo Posted November 18, 2013 Posted November 18, 2013 local VEH = { [ 581 ] = true, [ 509 ] = true, [ 481 ] = true, [ 462 ] = true, [ 521 ] = true, [ 463 ] = true, [ 510 ] = true, [ 522 ] = true, [ 461 ] = true, [ 448 ] = true, [ 468 ] = true, [ 586 ] = true } function onEnterVehicle ( theVehicle, seat, jacked ) if VEH [ getElementModel ( theVehicle ) ] then addPedClothes ( source, "moto", "moto", 16 ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), onEnterVehicle ) function onExitVehicle ( theVehicle, seat, jacked ) if VEH [ getElementModel ( theVehicle ) ] then removePedClothes ( source, 16 ) end end addEventHandler ( "onPlayerVehicleExit", getRootElement(), onExitVehicle )
hDavidm Posted November 18, 2013 Author Posted November 18, 2013 and a question:how you do it soo fast?
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