Jump to content

(HELP) SPAWN GROUP


side

Recommended Posts

Hello, I have a server and I would like to use a spawn by Groups
I want the clan members to be able to activate and deactivate this spawn with a command.

If you can help me, I thank you
---------------------------------------------------------------------------------------------------------------------------

local GroupName = 'KILLERS'
function onWasted ()
    if getElementData(source,'Group') == 'KILLERS' then
            setTimer( function (source)
             setElementDimension( source, 0 )
             setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 )
             setElementInterior( source, 0 )
             setPedArmor ( source, 100)
             setPedFightingStyle ( source, 5)
            end, 1000, 1, source)
    end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )

Link to comment
active = false
local GroupName = 'KILLERS'
function turned()
if active == false then
outputChatBox("Spawn enabled")
active=true
break
else then
outputChatBox("Spawn UnEnabled")
active =false
break
end
end
addCommandHandler("spawnturn", turned)
function onWasted ()
if active == true then
    if getElementData(source,'Group') == 'KILLERS' then
            setTimer( function (source)
             setElementDimension( source, 0 )
             setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 )
             setElementInterior( source, 0 )
             setPedArmor ( source, 100)
             setPedFightingStyle ( source, 5)
            end, 1000, 1, source)
            end
    end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )

 

  • Thanks 1
Link to comment
----
local GroupName = 'KILLERS'
----
function turnedON()
active=true
outputChatBox("Spawn enabled")
end
addCommandHandler("active", turnedON)

function turnedOFF()
 active=false 
 outputChatBox("Spawn disabled")

 end
addCommandHandler("desactive", turnedOFF)



function onWasted ()
if active == true then
    if getElementData(source,'Group') == 'KILLERS' then
            setTimer( function (source)
             setElementDimension( source, 0 )
             setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 )
             setElementInterior( source, 0 )
             setPedArmor ( source, 100)
             setPedFightingStyle ( source, 5)
            end, 1000, 1, source)
            end
    end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )

@side

there were some errors

  • Thanks 1
Link to comment
28 minutes ago, DiGiTal said:

----
local GroupName = 'KILLERS'
----
function turnedON()
active=true
outputChatBox("Spawn enabled")
end
addCommandHandler("active", turnedON)

function turnedOFF()
 active=false 
 outputChatBox("Spawn disabled")

 end
addCommandHandler("desactive", turnedOFF)



function onWasted ()
if active == true then
    if getElementData(source,'Group') == 'KILLERS' then
            setTimer( function (source)
             setElementDimension( source, 0 )
             setElementPosition( source, 2478.705078125+math.random(1,1), -1685.421875+math.random(1,1), 13.5078125 )
             setElementInterior( source, 0 )
             setPedArmor ( source, 100)
             setPedFightingStyle ( source, 5)
            end, 1000, 1, source)
            end
    end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )

@ChudovND @side

there were some errors

What does the error contain?

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