Jump to content

help required !


Machine

Recommended Posts

hey i edit one file from mtasa community but it doesnt work

the script must enable gm auto if map name is [TDD] and it will be enables for 1 min then the gm will turn off auto

can tell me whats wrong

gmontext = get("gmontext") 
gmoncolor = get("gmoncolor") 
gmofftext = get("gmofftext") 
gmoffcolor = get("gmoffcolor") 
  
addEvent("onMapStarting") 
addEventHandler("onMapStarting", getRootElement(), 
function(mapInfo) 
    if string.find(mapInfo.name, "[TDD]", 1, true) or mapInfo.modename == "Sprint" then 
    gmon() 
    setTimer ( mapInfo, 1000, 1, "Ghostmode will turn off in 1 min" ) 
        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 

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