Jump to content

How Group members will spawn own base ?


BlackWhite

Recommended Posts

Local GroupName = 'Warriors'
onWasted = function()
	if getElementData(hitElement,'Group') == 'Warriors' then
			function sp( source )
             setElementDimension( source, 0 )
             
            setElementPosition( source, 215.24719+math.random(1,5), 1861.27917+math.random(5,9), 13.14063 )
             setElementInterior( source, 0 )
			 setPedArmor ( source, 100)
			 setPedFightingStyle ( source, 5)
			end
			setTimer(sp,1000,1,source)
	end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )

I have group system and ı will add base to some groups.ı can make gate but ı cant make group spawn for base.ı am editing this codes.what is wrong ? can you give me any idea ? thanks fo all.

Link to comment

So, if i understand goodly you want to make players spawn in the base after 1 sec ?

 

local GroupName = 'Warriors'
function onWasted ()
	if getElementData(source,'Group') == 'Warriors' then
            setTimer( function (source)
             setElementDimension( source, 0 )
             setElementPosition( source, 215.24719+math.random(1,5), 1861.27917+math.random(5,9), 13.14063 )
             setElementInterior( source, 0 )
			 setPedArmor ( source, 100)
			 setPedFightingStyle ( source, 5)
			end, 1000, 1, source)
	end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted )

Don't forget that the event is "onPlayerSpawn" so, you are supposed to use spawnPlayer to call this event.

 

 

Edited by Gordon_G
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...