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.