Dolinho Posted October 17, 2014 Posted October 17, 2014 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 )
lLinux Posted October 17, 2014 Posted October 17, 2014 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 )
Dolinho Posted October 17, 2014 Author Posted October 17, 2014 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.
ZL|LuCaS Posted October 17, 2014 Posted October 17, 2014 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now