Jump to content

[REL] Auto GM | - War Of Empire - |


laserlaser

Recommended Posts

Hello,this my new script :) I write script at old days :)

The Code:

  
  
local isMapDM 
local isMapRace 
function gmActive( gmactv ) 
    if gmactv==1 then 
        for k,v in ipairs(getElementsByType("player")) do 
            setElementData( v, "overrideCollide.uniqueblah", 0, false ) 
            outputChatBox("Ghostmode Enabled by Server",v,0,255,0,true) 
            set("*ghostmode",true) 
        end 
    else 
        for k,v in ipairs(getElementsByType("player")) do 
            setElementData( v, "overrideCollide.uniqueblah", nil, false ) 
            set("*ghostmode",false) 
            outputChatBox("Ghostmode Disabled by Server",v,255,0,0,true) 
        end 
    end 
end 
  
function onMapStarting(mapInfo, mapOptions, gameOptions) 
    local isRace = 0 
    local isDM = 0 
    if #getElementsByType("checkpoint")>=1 then 
        isRace=1 
        isMapDM=0 
        isMapRace=1 
    end 
     
    if isRace==1 then 
        gmActive(1) 
    else 
        for a,c in ipairs(getElementsByType("racepickup")) do 
            if getElementData(c,"type")=="vehiclechange" then 
                if tonumber(getElementData(c,"vehicle")) == 425 then 
                    isDM=1 
                    isMapDM=1 
                    isMapRace=0 
                end 
            end 
        end 
         
        if isDM==1 then 
            gmActive(1) 
        else 
            gmActive(0) 
        end 
    end 
end 
addEvent("onMapStarting",true) 
addEventHandler("onMapStarting",getRootElement(),onMapStarting) 
  

MADE in TURKEY

|-War Of Empire -> Lua Team

Edited by Guest
Link to comment
  • 2 weeks later...

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