Jump to content

Team Spawnpoint


Recommended Posts

Posted

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

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

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 

Posted

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.

Posted
  
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 ?

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

If you want them as teams use Blaawee's code, But if you want them as ACL Groups then what you did should work

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

ok

& can i ask ?

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...