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)