laurens Posted October 22, 2009 Share Posted October 22, 2009 (edited) New question: In a gamemode, like race, certain maps get played. I want to get a message in a difference resource (ie. "monitor") whenever a pickup gets hit. Is this possible? I already tried this but it wouldn't respond when I hit a pickup: function pickupHit ( player ) outputChatBox ( "You have picked up a pickup.", player ) --Display this message in the chat box end addEventHandler ( "onPickupHit", getRootElement(), pickupHit ) Just to make things clear. Let say you're playing the map Freeroam in the gamemode Race. There are a lot of pickups there. Now I have a difference resource running (which I call "monitor") and I want to get a notice whenever a pickup gets hit by a player. Is this actually possible? Old question:How do I get the element ID of the vehicle the player drives? Just a quick question. Edited October 23, 2009 by Guest Link to comment
eAi Posted October 22, 2009 Share Posted October 22, 2009 getPedOccupiedVehicle. Just a quick answer. Link to comment
laurens Posted October 22, 2009 Author Share Posted October 22, 2009 Thanks! I was looking at vehicle/element/player-related functions Link to comment
laurens Posted October 23, 2009 Author Share Posted October 23, 2009 Bump for new question Link to comment
Gamesnert Posted October 23, 2009 Share Posted October 23, 2009 Race pickups aren't "actual" pickups. Normal pickups can only be picked up on foot. Race uses its own system to get around that. Therefore, onPickupHit won't work. For detecting race pickup pickups, use onPlayerPickUpRacePickup. Link to comment
eAi Posted October 23, 2009 Share Posted October 23, 2009 See https://wiki.multitheftauto.com/wiki/Resource:Race for more. 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