Jump to content

[Help] Hunter Alert


UserName

Recommended Posts

Hey, a friend and I tried to make a Hunter Alert for race gamemode. Apparently, it works for any other gamemode except for race :\ We tried using different events, including client-side too, but it still doesn't work. No errors in debugscript 3 mode either. Does anyone know what we should do? Here's the lua:

function hunterAlert ( theVehicle, seat ) 
    local id = getElementModel ( theVehicle ) 
    if id == 425 then 
        outputChatBox ("#ff0000" ..getPlayerName(source).. " got the hunter! Watch out!",getRootElement(),0,0,0,true )  
    end 
end 
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), hunterAlert ) 

Thanks :)

Edited by Guest
Link to comment

that won't work if i'm right, i've made a fully race userpanel for a friend and added that also, here is the code

function hunterAlert(mapInfo, pickupID, pickupType, vehicleModel) 
info = mapInfo.modename 
if info == "Destruction derby" then 
if pickupType == "vehiclechange" then  
if vehicleModel == 425 then  
outputChatBox("HUNTER ALERT: "..getPlayerName(source).." has a hunter!",getRootElement(),25,125,225) 
         end 
      end 
   end 
end 
addEventHandler("onPlayerPickUpRacePickup",getRootElement(),hunterAlert) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...