PleaseScript Posted October 21, 2012 Share Posted October 21, 2012 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 Link to comment
manve1 Posted October 21, 2012 Share Posted October 21, 2012 Hi guys some Spawn has a type that is to gangthe 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
PleaseScript Posted October 21, 2012 Author Share Posted October 21, 2012 Hi guys some Spawn has a type that is to gangthe 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
hassan.k.s.a Posted October 21, 2012 Share Posted October 21, 2012 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
Renkon Posted October 21, 2012 Share Posted October 21, 2012 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
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