manve1 Posted December 18, 2012 Share Posted December 18, 2012 Right, i created a script for a pick up (( my made pick up )) and when i hit the col shape it does work for 1 person, but not the person who hit the col shape Server side: local box1 = createObject( 2289, 2694, -1425, 15.2 ) local col1 = createColCuboid( 2693, -1426, 15.2, 2, 2, 3 ) addEventHandler('onColShapeHit', col1, function( ) setTimer( function( ) triggerClientEvent('anims', hitElement) setTimer( function( ) triggerClientEvent('anims2', hitElement) destroyElement( box1 ) destroyElement( col1 ) end, 1500, 1 ) end, 50, 1 ) Client side: addEvent('anims', true) addEventHandler('anims', getRootElement(), function() setPedAnimation( localPlayer, 'CARRY', 'liftup' ) triggerServerEvent('weapons"n"money', localPlayer) end ) addEvent('anims2', true) addEventHandler('anims2', getRootElement(), function() setPedAnimation( localPlayer, false ) end ) Link to comment
DNL291 Posted December 19, 2012 Share Posted December 19, 2012 Server side: local box1 = createObject( 2289, 2694, -1425, 15.2 ) local col1 = createColCuboid( 2693, -1426, 15.2, 2, 2, 3 ) addEventHandler('onColShapeHit', col1, function (hitElement) setTimer( function( ) triggerClientEvent('anims', hitElement, hitElement) end, 50, 1 ) setTimer( function( ) triggerClientEvent('anims2', hitElement, hitElement) destroyElement( box1 ) destroyElement( col1 ) end, 1500, 1 ) end ) Client side: addEvent('anims', true) addEventHandler('anims', getRootElement(), function(player) if isElement(player) then setPedAnimation( player, 'CARRY', 'liftup' ) triggerServerEvent('weapons"n"money', player) end end ) addEvent('anims2', true) addEventHandler('anims2', getRootElement(), function(player) if isElement(player) then setPedAnimation( player, false ) end end ) 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