Machine Posted May 18, 2014 Share Posted May 18, 2014 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
Castillo Posted May 18, 2014 Share Posted May 18, 2014 Do you get any error at the debugscript ( /debugscript 3 )? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now