Jump to content

particular Team


Dolinho

Recommended Posts

What should I use for a particular team does not use the command ?

server:

addCommandHandler('kill', 
function(kill) 
    setTimer(killPed, 3000, 1, kill) 
    setElementFrozen (kill, true) 
    outputChatBox ( "Voce sera morto em 3 segundos.", kill, 255, 255, 255, false ) 
    end 
end 
) 

Link to comment
addCommandHandler('kill', 
function(kill) 
    team = getTeamFromName("Team") -- Use if the group is not created from the script 
    the_team = getPlayerTeam(team) 
    if (the_team) then 
        outputChatBox ( "You can not use this command.", kill, 255, 255, 255, false ) 
    else 
        setTimer(killPed, 3000, 1, kill) 
        setElementFrozen (kill, true) 
        outputChatBox ( "Voce sera morto em 3 segundos.", kill, 255, 255, 255, false ) 
    end 
    end 
end 
) 

Link to comment

the script works not only this "else".

does not work:

team = getTeamFromName("Bandido") -- Use if the group is not created from the script 
    the_team = getPlayerTeam(team) 
    if (the_team) then 
        outputChatBox ( "Voce pertence a uma Team que nao pode usar este comando.", kill, 255, 255, 0, false ) 

is working:

else 
        setTimer(killPed, 3000, 1, kill) 
        setElementFrozen (kill, true) 
        outputChatBox ( "Voce sera morto em 9 segundos. Aguarde.", kill, 255, 255, 255, false ) 

sorry for the inconvenience.

Link to comment
the script works not only this "else".

does not work:

team = getTeamFromName("Bandido") -- Use if the group is not created from the script 
    the_team = getPlayerTeam(team) 
    if (the_team) then 
        outputChatBox ( "Voce pertence a uma Team que nao pode usar este comando.", kill, 255, 255, 0, false ) 

is working:

else 
        setTimer(killPed, 3000, 1, kill) 
        setElementFrozen (kill, true) 
        outputChatBox ( "Voce sera morto em 9 segundos. Aguarde.", kill, 255, 255, 255, false ) 

sorry for the inconvenience.

the_team = getPlayerTeam(team)

(team) needs to be the player obs: (source or player)

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