Advertisement
dodostyle

GTO Torcidas [MTA] {BETA}

May 21st, 2013
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. -- GameMode GTO Torcidas, Criado Por DoDo [GTO Torcidas - {MTA} BETA]
  2. -- Uso somente para o servidor GTO Torcidas
  3.  
  4. -- Variaveis
  5. local torcida
  6. local chatRadius = 40 --Chat Limite
  7. playerid = getRootElement()
  8.  
  9. -- Quando o Jogador entra no servido
  10. function OnPlayerConnect()
  11. local Posx, Posy, Posz = 1959.55, -1714.46, 10
  12. spawnPlayer(source, Posx, Posy, Posz)
  13. fadeCamera(source, true)
  14. setCameraTarget(source, source)
  15. outputChatBox("** Seja Bem vindo a GTO Torcidas [MTA] BETA - Acima Dos Rivais!, GTO Torcidas [MTA] BETA", source)
  16. outputChatBox("** Qualquer dúvidas, procure um adminstrador ou digite /ajuda.", source)
  17. outputChatBox("** Acesse o nosso site: www.gtotorcidas.cz.cc, e fique por dentro das nossas noticias!", source)
  18. outputChatBox("** Está sozinho ? Não sabe onde esta a sua torcida ? Use # ou ! para falar com a sua torcida!", source)
  19. outputChatBox("* " .. getPlayerName(source) .. " has joined the server")
  20. end
  21. addEventHandler("onPlayerConnect", getRootElement(), OnPlayerConnect)
  22.  
  23.  
  24. -- Quando o Jogador Sair
  25. function OnPlayerDisconnect( reason )
  26. outputChatBox ( getPlayerName( source ).." saiu do servidor ("..reason..")" )
  27. end
  28. addEventHandler( "onPlayerQuit", getRootElement(), OnPlayerDisconnect )
  29.  
  30.  
  31.  
  32. -- Quando o Jogador da Spawn
  33. function OnPlayerSpawn ( thePlayer )
  34. local playerName = getPlayerName( thePlayer )
  35. if torcida == 1 then
  36. spawnPlayer(thePlayer, 0.0, 0.0, 0.0)
  37. end
  38. end
  39. addEventHandler("onPlayerSpawn", playerid, OnPlayerSpawn)
  40.  
  41.  
  42. -- Quando o Jogador Morre
  43. function OnPlayerDeath ( ammo, attacker, weapon, bodypart )
  44.  
  45. if ( attacker ) then -- Se Alguem mato ele
  46.  
  47. local tempString
  48. if ( getElementType ( attacker ) == "player" ) then
  49. tempString = getPlayerName ( attacker ).." Matou "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")"
  50.  
  51. elseif ( getElementType ( attacker ) == "vehicle" ) then
  52. local tempString = getPlayerName ( getVehicleController ( attacker ) ).." Matou "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")"
  53. end
  54.  
  55. if ( bodypart == 9 ) then
  56. tempString = tempString.."Execução [HS]"
  57. else
  58. tempString = tempString.." ("..getBodyPartName ( bodypart )..")"
  59. end
  60. outputChatBox ( tempString )
  61. else
  62. outputChatBox ( getPlayerName ( source ).." Se matou. ("..getWeaponNameFromID ( weapon )..") ("..getBodyPartName ( bodypart )..")" )
  63. end
  64. end
  65. addEventHandler ("onPlayerWasted", getRootElement(), OnPlayerDeath)
  66.  
  67.  
  68.  
  69. --Prevensão
  70. addEventHandler( 'onPlayerVoiceStart', root,
  71. function()
  72. if isGuestAccount( getPlayerAccount(source) ) then
  73. cancelEvent()
  74. end
  75. end
  76. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement