BorderLine Posted April 13, 2012 Posted April 13, 2012 Hi everyone. Well i was trying to make a random spawn to everyone acl and my problem is, when the player dead, spawn in random place. but skin dont work. Spawn with cj skin But the others acl, like admin and smod work with skin, Still having same skin this is my code local randomSpawnTable = { { -2818.3, 1134.4, 26.1, 179.2 }, { -343.3, 1544.2, 75.5 }, { 2221.3, 1838.4, 10.8, 90.3 } } function randomSpawn( thePlayer, randomSpawnTable ) local random = math.random( 1, #randomSpawnTable ) spawnPlayer( thePlayer, randomSpawnTable[random][1], randomSpawnTable[random][2], randomSpawnTable[random][3], randomSpawnTable[random][4] ) end addEventHandler( "onPlayerWasted", getRootElement( ), function() local skin = getElementModel(source) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(source)) , aclGetGroup ( "Admin" ) ) then setTimer( spawnPlayer, 5000, 1, source, 2531.03, 2804.1, 11.1, 180,skin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(source)) , aclGetGroup ( "Moderator" ) ) then setTimer( spawnPlayer, 5000, 1, source, -343.3, 1544.2, 75.5, 180,skin ) elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(source)) , aclGetGroup ( "Everyone" ) ) then setTimer( randomSpawn, 5000, 1, source,randomSpawnTable, skin ) end end ) thanks for your time Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
Castillo Posted April 13, 2012 Posted April 13, 2012 local randomSpawnTable = { { -2818.3, 1134.4, 26.1, 179.2 }, { -343.3, 1544.2, 75.5 }, { 2221.3, 1838.4, 10.8, 90.3 } } function randomSpawn ( thePlayer, skin ) local random = math.random ( #randomSpawnTable ) if spawnPlayer ( thePlayer, unpack ( randomSpawnTable [ random ] ) ) then setElementModel ( thePlayer, skin ) end end addEventHandler ( "onPlayerWasted", getRootElement( ), function ( ) local skin = getElementModel ( source ) local accountName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) then setTimer( spawnPlayer, 5000, 1, source, 2531.03, 2804.1, 11.1, 180, skin ) elseif isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Moderator" ) ) then setTimer( spawnPlayer, 5000, 1, source, -343.3, 1544.2, 75.5, 180, skin ) elseif isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Everyone" ) ) then setTimer( randomSpawn, 5000, 1, source, skin ) end end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
BorderLine Posted April 13, 2012 Author Posted April 13, 2012 working man tanks a lot Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
Castillo Posted April 13, 2012 Posted April 13, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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