SoundWave Posted December 27, 2010 Share Posted December 27, 2010 Hey, i have a ghostmode script it disables on DD maps and enables on DM maps the only thing that doesnt work is that it doesn't disable when it pickups a hunter pickup I dont get what the error is because i doesnt give any errors, plz help the script gmontext = get("gmontext") gmoncolor = get("gmoncolor") gmofftext = get("gmofftext") gmoffcolor = get("gmoffcolor") gmoffcolorathunter = get("gmoffcolorathunter") gmofftextathunter = get("gmofftextathunter") 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 hunter(pickupID, pickupType, vehicleModel) if info == "[DM]" then if pickupType == "vehiclechange" then if vehicleModel == 425 then setElementData(thePlayer, "overrideCollide.uniqueblah", nil, false ) outputChatBox(gmofftextathunter..gmoffcolorathunter,theplayer,25,125,225,true) end end end end addEventHandler("onPlayerPickUpRacePickup",getRootElement(),hunter) 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 meta.xml <meta> <info name="Autoghostmode" author="ahmtork" type= "script" version="1.0.0"/> <script src="ghostmode.lua" type="server"/> <settings> <setting name="*gmontext" value="Ghostmode is enabled!" /> <setting name="*gmoncolor" value="#FF001E" /> <setting name="*gmofftext" value="Ghostmode is disabled!" /> <setting name="*gmoffcolor" value="#FFFFFF" /> <setting name="*gmofftextathunter" value="Ghostmode is disabled because hunter is reached!" /> <setting name="*gmoffcolorathunter" value="#ff001E" /> </settings> </meta> Link to comment
dzek (varez) Posted December 27, 2010 Share Posted December 27, 2010 1. use [lua][/lua] or tags. 2. search before posting. this question was asked so many times. just search, copy,paste and enjoy solution. much faster than waiting for somebody to solve same problem. 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