Dolinho Posted October 17, 2014 Share 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 ) Link to comment
lLinux Posted October 17, 2014 Share 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 ) Link to comment
Dolinho Posted October 17, 2014 Author Share 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. Link to comment
ZL|LuCaS Posted October 17, 2014 Share 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) Link to comment
Dolinho Posted October 17, 2014 Author Share Posted October 17, 2014 Thanks, helped me again. Link to comment
ZL|LuCaS Posted October 17, 2014 Share Posted October 17, 2014 Thanks, helped me again. you're welcome. Link to comment
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