Jump to content

arrays


-stolka-

Recommended Posts

Posted

hi i have this function... how do i make "Ateam" variable contains two teams?

  
local Ateam = getTeamFromName ( "Delta Force" ) 
  
addCommandHandler( "soldiers",  
    function( plr, cmd, amount ) 
        if not amount then return end 
        amount = tonumber( amount ); 
        local x, y, z = getElementPosition( plr ); 
        local peds = { } 
        for i = 1, amount do 
            x = x + math.cos( math.rad( i + 10 ) ) * 2; 
            y = y - math.sin( math.rad( i + 10 ) ) * 2; 
            local ped = exports [ "slothBot" ]:spawnBot ( x, y, z, 270,  math.random ( 300, 303 ), 0, 0, Ateam, math.random ( 24, 32 ),         "chasing", true ); 
        setElementModel ( ped, 287 ); 
        setPedStat(ped, 24, 1000); 
        setPedStat(ped, 78, 1000); 
        setPedStat(ped, 79, 1000); 
        setPedStat(ped, 77, 1000); 
        setPedStat(ped, 73, 1000); 
        setPedStat(ped, 72, 1000); 
        setPedStat(ped, 74, 1000); 
        setPedStat(ped, 70, 1000); 
        setPedStat(ped, 71, 1000); 
        setPedStat(ped, 69, 1000); 
        setPedStat(ped, 76, 1000); 
        setPedStat(ped, 75, 1000); 
            if ped then 
                if not playerPeds[ plr ] then 
                    playerPeds[ plr ] = {  }; 
                    table.insert( playerPeds[ plr ], ped ); 
                else 
                    table.insert( playerPeds[ plr ], ped ); 
                end 
                table.insert( peds, ped ); 
            end 
        end 
    end 
) 

CAOS RP

SKYPE: stolka.caosrp

CONNECT to CAOS RP

Posted

I'm not sure that you can make someone or something be on two teams, the tab would just bug up to start with..

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

I don't get what do you mean.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You can't as far as I know.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Yeah, that's what I meant, he can't do it that way, he would need to edit slothbot to do it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...