BlackWhite Posted January 28, 2018 Posted January 28, 2018 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.
Gordon_G Posted January 28, 2018 Posted January 28, 2018 (edited) 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 January 28, 2018 by Gordon_G Gordon#6977
BlackWhite Posted January 28, 2018 Author Posted January 28, 2018 ah thanks buddy.so how can ı add colorly base zone,if other group member will enter the base , he will die 5 seconds later.just ı need idea.which command ı am thinking
NeXuS™ Posted January 28, 2018 Posted January 28, 2018 You could use createColCuboid and onColShapeHit event with some timers and renders. Did I help you? NeXuS™#0001
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