20 Haziran 2018, 15:53:44

Gönderen Konu: [YARDIM] Greenzone  (Okunma sayısı 291 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

DogukanSkill

  • Acemi Üye
  • *
  • İleti: 102
  • Norm Freeroam
[YARDIM] Greenzone
« : 01 Nisan 2017, 22:01:05 »
Greenzone'li alana girince "realdriveby" (araçtan ateş etme) scriptini devre dışı bırakabilir miyiz?


Greenzone | server.lua
Kod: Lua
  1. addEventHandler ("onResourceStart", getRootElement(),
  2. function()
  3.   setTimer (moneyZoneTimerFunction, 2500, 0)
  4.   local allGreenzones = getElementsByType ("radararea")
  5.   for i,v in ipairs (allGreenzones) do
  6.     local r,g,b,a = getRadarAreaColor (v)
  7.     if (r == 0) and (g == 255) and (b == 0) and (a == 127) then
  8.       local x,y = getElementPosition (v)
  9.       local sx,sy = getRadarAreaSize (v)
  10.       local col = createColCuboid (x,y, -50, sx,sy, 7500)
  11.       setElementID (col, "greenzoneColshape")
  12.     end
  13.   end
  14. end)
  15.  
  16. addEventHandler ("onColShapeHit", getRootElement(),
  17. function(hitElement, matchingDimension)
  18.   if (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then
  19.     toggleControl (hitElement, "fire", false)
  20.     toggleControl (hitElement, "next_weapon", false)
  21.     toggleControl (hitElement, "previous_weapon", false)
  22.     toggleControl (hitElement, "sprint", false)
  23.     toggleControl (hitElement, "aim_weapon", false)
  24.     toggleControl (hitElement, "vehicle_fire", false)
  25.     triggerClientEvent (hitElement, "enableGodMode", hitElement)
  26.   end
  27.   if (source == moneyZoneCol) and (getElementType (hitElement) == "vehicle") then
  28.     setElementVelocity (hitElement, 0, 0, 0)
  29.     setElementPosition (hitElement, 2018.33, 1534.77, 12.37)
  30.     setVehicleRotation (hitElement, 0,0,270)
  31.     if (getVehicleOccupant (hitElement, 0)) then
  32.     end
  33.   end
  34. end)
  35.  
  36. addEventHandler ("onColShapeLeave", getRootElement(),
  37. function(leaveElement, matchingDimension)
  38.   if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then
  39.     toggleControl (leaveElement, "fire", true)
  40.     toggleControl (leaveElement, "next_weapon", true)
  41.     toggleControl (leaveElement, "previous_weapon", true)
  42.     toggleControl (leaveElement, "sprint", true)
  43.     toggleControl (leaveElement, "aim_weapon", true)
  44.     toggleControl (leaveElement, "vehicle_fire", true)
  45.     triggerClientEvent (leaveElement, "disableGodMode", leaveElement)
  46.   end
  47. end)
  48.  
  49. --money zone col
  50. moneyZoneCol = createColCuboid (1993.12, 1519.14, -100, 17.43, 54.24, 117)
  51. --stop moneyzone col
  52.  
  53. function moneyZoneTimerFunction ()
  54.   local allPlayersInCol = getElementsWithinColShape (moneyZoneCol, "player")
  55.   for i,v in ipairs (allPlayersInCol) do
  56.     givePlayerMoney (v, 5)
  57.   end
  58. end
  59.  
  60. -- marker bij hospital
  61. createMarker (1607.36, 1814.24, -10, "cylinder", 24, 0, 255, 0, 190, getRootElement())
 

MTASA-TURK | Türkiye'nin En Güncel MTA Platformu

[YARDIM] Greenzone
« : 01 Nisan 2017, 22:01:05 »

Paradox

  • Kurucu
  • *
  • İleti: 639
  • SH Gaming
Ynt: [YARDIM] Greenzone
« Yanıtla #1 : 02 Nisan 2017, 19:50:15 »
'realdriveby' scriptini yollar mısın.
 

DogukanSkill

  • Acemi Üye
  • *
  • İleti: 102
  • Norm Freeroam
Ynt: [YARDIM] Greenzone
« Yanıtla #2 : 02 Nisan 2017, 19:54:31 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
'realdriveby' scriptini yollar mısın.

Buyur: Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
 

Paradox

  • Kurucu
  • *
  • İleti: 639
  • SH Gaming
Ynt: [YARDIM] Greenzone
« Yanıtla #3 : 02 Nisan 2017, 19:59:23 »
Dosya ekte. Denemedim çalışmazsa söyle.