Jump to content

[REQ](help)Auto disable ghostmode when hunter is reached.


SoundWave

Recommended Posts

Hey guys,

I wonder if somebody could help me.

I have a ghostmode script that auto enables ghostmode when there is playing a "[DM]" map

and it auto disables when there is playing a "[DD]" map

Wel my question is could somebody make or explain some function that auto disables ghostmode when the hunter is reached in "[DM]" maps.

Thx in advance.

Offtopic: I am new :D

Link to comment
gmontext = get("gmontext") 
gmoncolor = get("gmoncolor") 
gmofftext = get("gmofftext") 
gmoffcolor = get("gmoffcolor") 
gmofftextathunter = get("gmofftextathunter") 
gmoffcolorathunter = get("gmoffcolorathunter") 
  
addEvent("onMapStarting") 
addEventHandler("onMapStarting", getRootElement(), 
function(mapInfo) 
    if string.find(mapInfo.name, "[DM]", 1, true) or mapInfo.modename == "Sprint" then 
    gmon() 
        else 
    gmoff() 
    end 
end) 
function gmon() 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            setElementData( thePlayer, "overrideCollide.uniqueblah", 0, false ) 
            outputChatBox(gmoncolor..gmontext,thePlayer,186,212,71,true) 
        end 
end 
function gmoff() 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            setElementData(thePlayer, "overrideCollide.uniqueblah", nil, false ) 
            outputChatBox(gmoffcolor..gmofftext,thePlayer,255,255,255,true) 
        end 
end 
  
addEvent('onPlayerPickUpRacePickup') 
addEventHandler('onPlayerPickUpRacePickup', g_Root, 
    function hunterBonus(pickupID, pickupType, vehicleModel) 
        if vehicleModel == 425 then 
function(mapInfo) 
    if string.find(mapInfo.name, "[DM]", 1, true) or mapInfo.modename == "Sprint" then 
    gmoff() 
    end 
end) 
function gmoffathunter() 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            setElementData(thePlayer, "overrideCollide.uniqueblah", nil, false ) 
            outputChatBox(gmoffcolorathunter..gmofftextathunter,thePlayer,255,255,255,true) 
        end 
end 

It doesn't work maybe you can help

Edited by Guest
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...