Jump to content

Destroy Player


Recommended Posts

You can't. Instead, try this code at the start of your gamemode

_getElementsByType = getElementsByType 
_spawnPlayer = spawnPlayer 
_destroyElement = destroyElement 
function getElementsByType(i, ...) 
    if i == "player" then 
       local tab = {} 
       for i,v in ipairs(_getElementsByType"player") do 
         if not getElementData("isDestroyed") then 
             tab[i] = v 
       return tab 
    else return _getElementsByType(i,...) 
function spawnPlayer(p,...) 
    setElementData(p, "isDestroyed", false, true) 
function destroyElement(e,...) 
    setElementData(e, "isDestroyed", true, true) 

it's untested. syntax is correct tho

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