Robert_Easter Posted July 26, 2024 Posted July 26, 2024 Hello, How can I make car jacking possible between players ? like if the car is open, and someone presses F, he can put the other player out of the car and jack it. Thank you
Robert_Easter Posted July 27, 2024 Author Posted July 27, 2024 Still wondering how to allow people do this
Robert_Easter Posted July 27, 2024 Author Posted July 27, 2024 Someone check if this works I have no one to test right now friend is far away Server side : mp.events.add('playerJoin', (player) => { player.call('setRelationshipGroup'); }); -------------------------------------------------- Client side : mp.events.add('setRelationshipGroup', () => { const player = mp.players.local; const relationshipGroup = mp.game.joaat("PLAYER"); player.setRelationshipGroupHash(relationshipGroup); mp.game.ped.setRelationshipBetweenGroups(5, relationshipGroup, relationshipGroup); });
shrox Posted July 30, 2024 Posted July 30, 2024 (edited) You could do it using tasks and overwriting default enter/exit Player::taskEnterVehicle - RAGE Multiplayer Wiki flag id 8 for example will jack the car from a driver Edited July 30, 2024 by shrox
Robert_Easter Posted July 30, 2024 Author Posted July 30, 2024 Actually I tested my code and it works 100% Server side : mp.events.add('playerJoin', (player) => { player.call('setRelationshipGroup'); }); -------------------------------------------------- Client side : mp.events.add('setRelationshipGroup', () => { const player = mp.players.local; const relationshipGroup = mp.game.joaat("PLAYER"); player.setRelationshipGroupHash(relationshipGroup); mp.game.ped.setRelationshipBetweenGroups(5, relationshipGroup, relationshipGroup); });
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