medus Posted December 25, 2020 Posted December 25, 2020 (edited) When a hunter buys it, it gives money and points. But not a hunter, I want him to get money and points when someone wins. Is there anyone who can help? function addHunterBonus(player) if isPlayerLogged(player) then addDataValue ( player, "cash", "500") addDataValue ( player, "points", "5") addDataValue ( player, "Hunter", "1") outputChatBox("[HUNTER] #FF6600 You won $500 and 5 points for Win!",player,_r,_g,_b,true) end end function getHunter(pickupID,pickupType,pickupModel) if pickupType == "vehiclechange" then if pickupModel == 425 then addWinnerBonus(source) end end end addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),getHunter) Edited December 25, 2020 by medus
Moderators Tut Posted December 25, 2020 Moderators Posted December 25, 2020 (edited) Welcome to the forums and happy holidays @medus! Thread's been moved out of Tutorials into the Scripting section for best results. Your duplicate has been deleted, as there's no point receiving help in 2 places regarding the same inquiry. Edited December 25, 2020 by Tut
justn Posted December 25, 2020 Posted December 25, 2020 Correct me if I'm wrong but I'm assuming all you're wanting here is that when the player hits the hunter then he gets the hunter bonus ? If this is the case then the only issue with your code is that in your getHunter function, you need to change addWinnerBonus to addHunterBonus 1
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