Jump to content

Group Problem


justn

Recommended Posts

Hey, so for the first code, the problem is, the player ( who's in group RIOT ) when he dies, he does not spawn in the location specified below.

addEventHandler ( "onPlayerWasted", getRootElement(), 
function (player) 
if (getElementType(player) == ("player")) then 
if  ( getElementData ( player, "Group" ) ~= "RIOT" ) then 
setTimer (spawnPlayer, 1500, 1, player, 846.85522460938, -2106.7973632813, 13.618446350098, 0, getPedSkin (player), 0, 0, getPlayerTeam(player)) 
end 
end 
end) 

and for this code below, the players in group "RIOT" cant kill each other, but it does not work, Idk why :/ I also don't get errors in debugscript but here you go.

addEventHandler ( "onPlayerDamage", getRootElement (), 
function (attacker) 
if ( getElementData(attacker, "Group" ) ~= "RIOT" ) and ( getElementData(source, "Group" ) ~= "RIOT" ) then 
cancelEvent() 
end 
end)  

Link to comment
  
addEventHandler ( "onPlayerWasted", getRootElement(), 
function ( source ) 
if (getElementType( source ) == ("player")) then 
if  ( getElementData ( source , "Group" ) =="RIOT" ) then 
setTimer (spawnPlayer, 1500, 1, player, 846.85522460938, -2106.7973632813, 13.618446350098, 0, getElementModel( source ), 0, 0, getPlayerTeam( source )) 
end 
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...