Jump to content

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


SoundWave

Recommended Posts

Posted

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

Posted

You are new so:

we are not fulfilling requests, we are here to help people. You have to learn scripting - if you have some code and get stuck - we will help you. If you are too lazy to learn - then offer some money - MAYBE somebody will be interested.

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

:o

I am just asking for something small (i think): the only thing i want is a site where there is some explanation abouth THIS script or if you are verry pollite you could make me one (the last option is optional)

Posted

so:

1. learn basics of scripting

2. find here an event when player is picking up a race pickup

3. check how your resource is enabling/disabling ghost mode

4. when event from point 2 will be triggered - check vehicle model - if this will be hunter id - disable ghostmode

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted (edited)
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

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...