Vinspire Posted June 15, 2014 Share Posted June 15, 2014 Hello folks, I'd like to use getElementData & set to enable/disable spectatorkill with this function but I have no clue how to do it tbh. Could any of you edit the lua below to show me how you do it? addEvent("onRaceStateChanging") addEventHandler("onRaceStateChanging", root, function (newState) if newState == "Running" then local theSpectatorTeam = getTeamFromName("Spectators") if ( theSpectatorTeam ) then local players = getPlayersInTeam ( theSpectatorTeam ) for key, player in ipairs ( players ) do local theVehicle = getPedOccupiedVehicle ( player ) if ( theVehicle ) then blowVehicle(theVehicle,false) setElementPosition(getPedOccupiedVehicle(thePlayer), 0, 0, 0) setElementHealth(thePlayer, 0) end end end end end) Thanks 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