Jump to content

Script request


gytisan

Recommended Posts

i think posible only ghostmode

addEvent("onMapStarting") 
addEventHandler("onMapStarting", getRootElement(), 
function(mapInfo, mapOptions, gameOptions) 
    if (ismapDM(mapInfo.name) == 1) then 
        outputChatBox("#FFFFFFPlaying a #ff4500[DM] #ffffffmap, ghostmode #00ff00ENABLED",getRootElement(),255,255,255,true) 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            setElementData( thePlayer, "overrideCollide.uniqueblah", 0, false ) 
        end 
    elseif (ismapDM(mapInfo.name) == 2) then 
        outputChatBox("#FFFFFFPlaying a #ff4500[DD] #ffffffmap, ghostmode #FF0000DISABLED",getRootElement(),255,255,255,true) 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            setElementData(thePlayer, "overrideCollide.uniqueblah", nil, false ) 
        end 
    elseif (ismapDM(mapInfo.name) == 3) then 
        outputChatBox("#FFFFFFPlaying a #ff4500[FUN] #ffffffmap, ghostmode #FF0000DISABLED",getRootElement(),255,255,255,true) 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            setElementData(thePlayer, "overrideCollide.uniqueblah", nil, false ) 
        end 
  
    end 
end 
) 
  
function ismapDM(asd) 
    if string.find(asd, "[DM]", 1, true) then 
        return 1 
    elseif string.find(asd, "[DD]", 1,true) then 
        return 2 
    elseif string.find(asd, "[FUN]", 1,true) then 
        return 3 
    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...