Jump to content

[HELP]SWAT Job


gghvcffcv

Recommended Posts

The problem is When a player is in SWAT Team and other player want to Join in SWAT Team the other Player cannot join

Server:

function aceptarr (hitElement) 
local theTeam = createTeam ( "SWAT" ) 
setTeamColor ( theTeam, 0, 0, 255 ) 
if theTeam then       
setPlayerTeam ( source, theTeam ) 
setPlayerNametagColor ( source, 0, 0, 255 ) 
setElementModel ( source, 285 ) 
giveWeapon ( source, 31, 550 ) 
giveWeapon ( source, 23, 550 ) 
giveWeapon ( source, 3, 550 ) 
giveWeapon ( source, 29, 550 ) 
giveWeapon ( source, 46, 550 ) 
giveWeapon ( source, 41, 5000 ) 
end 
end 
addEvent( "onGreeting", true ) 
addEventHandler( "onGreeting", root, aceptarr ) 

Link to comment

You must create the team once, then get it from it's name.

createTeam ( "SWAT", 0, 0, 255 ) 
  
function aceptarr ( ) 
    local theTeam = getTeamFromName ( "SWAT" ) 
    if ( theTeam ) then 
        setPlayerTeam ( source, theTeam ) 
        setPlayerNametagColor ( source, 0, 0, 255 ) 
        setElementModel ( source, 285 ) 
        giveWeapon ( source, 31, 550 ) 
        giveWeapon ( source, 23, 550 ) 
        giveWeapon ( source, 3, 550 ) 
        giveWeapon ( source, 29, 550 ) 
        giveWeapon ( source, 46, 550 ) 
        giveWeapon ( source, 41, 5000 ) 
    end 
end 
addEvent( "onGreeting", true ) 
addEventHandler( "onGreeting", root, aceptarr ) 

Link to comment
You must create the team once, then get it from it's name.
createTeam ( "SWAT", 0, 0, 255 ) 
  
function aceptarr ( ) 
    local theTeam = getTeamFromName ( "SWAT" ) 
    if ( theTeam ) then 
        setPlayerTeam ( source, theTeam ) 
        setPlayerNametagColor ( source, 0, 0, 255 ) 
        setElementModel ( source, 285 ) 
        giveWeapon ( source, 31, 550 ) 
        giveWeapon ( source, 23, 550 ) 
        giveWeapon ( source, 3, 550 ) 
        giveWeapon ( source, 29, 550 ) 
        giveWeapon ( source, 46, 550 ) 
        giveWeapon ( source, 41, 5000 ) 
    end 
end 
addEvent( "onGreeting", true ) 
addEventHandler( "onGreeting", root, aceptarr ) 

Thanks you !

Link to comment

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