-.Paradox.- Posted June 13, 2013 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
xXMADEXx Posted June 13, 2013 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
Blaawee Posted June 13, 2013 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.
-.Paradox.- Posted June 13, 2013 Author 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 ?
PaiN^ Posted June 13, 2013 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
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