-.Paradox.- Posted June 13, 2013 Share Posted June 13, 2013 Hello, i want add spawnpoint for five teams : Forever, Saint Row, Task Forces, Monster Energy, Iron Weasel. P.S : I added them to acl and i'm using play gamemode Link to comment
xXMADEXx Posted June 13, 2013 Share Posted June 13, 2013 Basicly this; addEventHandler ( "onPlayerLogin", root, function ( ) if ( isPlayerInACL ( source, "Forever" ) ) then spawnPlayer ( source, 5, 00565, 95 ) elseif -- so on end end ) function isPlayerInACL(player,acl) local account = getAccountName(getPlayerAccount(player)) if(isObjectInACLGroup("user."..account,aclGetGroup(acl))) then return true else return false end end Link to comment
Blaawee Posted June 13, 2013 Share Posted June 13, 2013 Are the teams have been created? if so try this local gTeam = { --['Team Name'] = { PosX, PosY, PosZ, Rotation, SkinID, interior, dimension } [ 'Forever' ] = { 0, 0, 0, 0, 0, 0, 0 }, [ 'Saint Row' ] = { 0, 0, 0, 0, 0, 0, 0 } }; addEventHandler( 'onPlayerSpawn', root, function( _, _, _, _, theTeam ) if gTeam[ theTeam ] then spawnPlayer( source, gTeam[ theTeam ][ 1 ], gTeam[ theTeam ][ 2 ], gTeam[ theTeam ][ 3 ], gTeam[ theTeam ][ 4 ], gTeam[ theTeam ][ 5 ], gTeam[ theTeam ][ 6 ], gTeam[ theTeam ][ 7 ] ); fadeCamera( source, true ); setCameraTarget( source, source ); end end ); P.S : You have to spawn them before. Link to comment
-.Paradox.- Posted June 13, 2013 Author Share Posted June 13, 2013 addEventHandler ( "onPlayerLogin", root, function ( ) if ( isPlayerInACL ( source, "Forever" ) ) then spawnPlayer ( source, 5, 00565, 95 ) elseif ( isPlayerInACL ( source, "Saint Row" ) ) then spawnPlayer ( source, 5, 00565, 95 ) end end ) function isPlayerInACL(player,acl) local account = getAccountName(getPlayerAccount(player)) if(isObjectInACLGroup("user."..account,aclGetGroup(acl))) then return true else return false end end Like that ? Link to comment
PaiN^ Posted June 13, 2013 Share Posted June 13, 2013 If you want them as teams use Blaawee's code, But if you want them as ACL Groups then what you did should work 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