hDavidm Posted November 18, 2013 Share 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) Link to comment
Castillo Posted November 18, 2013 Share 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 ) Link to comment
hDavidm Posted November 18, 2013 Author Share Posted November 18, 2013 and a question:how you do it soo fast? Link to comment
hDavidm Posted November 18, 2013 Author Share Posted November 18, 2013 now it's working perfect Link to comment
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