Jump to content

Spawn Team Please


PleaseScript

Recommended Posts

Hi guys some Spawn has a type that is to gang

the guy in the gang Police ai ta when he dies I put a spawn in a place just for this gang's when the guy dies and this gang is going to spawn q I colokei her

Can someone help me thanks

USE THESE FUNCTIONS:

getPlayerTeam, 
spawnPlayer 

Link to comment
Hi guys some Spawn has a type that is to gang

the guy in the gang Police ai ta when he dies I put a spawn in a place just for this gang's when the guy dies and this gang is going to spawn q I colokei her

Can someone help me thanks

USE THESE FUNCTIONS:

getPlayerTeam, 
spawnPlayer 

function SpawnTeam ( thePlayer )

local team = getPlayerTeam ( thePlayer )

if ( getTeamName( team ) == "Policia" ) then

spawnPlayer ( thePlayer, 2290.5969238281, 2452.1838378906, 10.8203125 )

end

end

addEventHandler ( "onPlayerSpawn", SpawnTeam )

??????????

Link to comment
function Wasted(player) 
        local team = getTeamFromName("Policia") 
        local pteam = getPlayerTeam(player) 
        if ( pteam == team ) then 
                spawnPlayer (player, 2495.3654785156,-1687.6867675781,13.517179548035, 0,0,0,0,team) 
        end 
end 
addEventHandler("onPlayerWasted", root, 
        function() 
                setTimer(Wasted, 1000, 1, source) 
        end 
) 

Link to comment
function Wasted(player) 
        local team = getTeamFromName("Policia") 
        local pteam = getPlayerTeam(player) 
        if ( pteam == team ) then 
                spawnPlayer (player, 2495.3654785156,-1687.6867675781,13.517179548035, 0,0,0,0,team) 
        end 
end 
addEventHandler("onPlayerWasted", root, 
        function() 
                setTimer(Wasted, 1000, 1, source) 
        end 
) 

Somehow that will throw warnings. Instead of

setTimer(Wasted, 1000, 1, source) 

use:

local pVar = source 
setTimer(Wasted, 1000, 1, pVar) 

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