Üdv olyan kérdésem lenne,hogy tudnám megoldani azt,hogy ha belép valaki safezoneba akkor csak neki írja ki és csak rá hasson az adot script?És zombik ne spawnoljanak oda?
local screenW, screenH = guiGetScreenSize()
function zoneText()
dxDrawRectangle(695, 561, 91, 20, tocolor(247, 255, 245, 62), false)
dxDrawText(\"Safe Zone\", 718, 562, 777, 579, tocolor(0, 0, 0, 255), 1.30, \"default-bold\", \"right\", \"top\", true, true, false, true, false)
dxDrawText(\"Safe Zone\", screenW * 0.896, screenH * 0.935, screenW * 0.970, screenH * 0.963, tocolor(53, 255, 0, 255), 1.30, \"default-bold\", \"right\", \"top\", true, true, false, true, false)
end
zoneLS = createColRectangle(1150.05579, -1390.17407,100,100)
zoneLV = createColRectangle(1577.66418, 1723.38440,65,150)
zoneSF = createColRectangle(-2740.70898, 578.36127,144,120)
zoneColorLS = createRadarArea (1150.05579, -1390.17407,100,100,255,255,255)
zoneColorLV = createRadarArea (1577.66418, 1723.38440,65,150,255,255,255)
zoneColorSF = createRadarArea (-2740.70898, 578.36127,144,120,255,255,255)
function PlayerD()
cancelEvent ()
end
function hit(element)
if source == zoneLS or source == zoneLV or source == zoneSF then
if (getElementType (element) == \"vehicle\") then
triggerServerEvent (\"del\",localPlayer,element)
elseif (getElementType (element) == \"player\") then
outputChatBox (\"you are now in Safe Zone \",255,0,0,true)
addEventHandler(\"onClientRender\", root,zoneText)
addEventHandler (\"onClientPlayerDamage\",getRootElement(),PlayerD)
toggleControl (\"next_weapon\",false)
toggleControl (\"previous_weapon\",false)
toggleControl (\"fire\",false)
setPlayerWeaponSlot (element,0)
end
end
end
function Leave()
if source == zoneLS or source == zoneLV or source == zoneSF then
outputChatBox (\"I\'ve left the safe zone \",255,0,0,true)
removeEventHandler(\"onClientRender\", root,zoneText)
removeEventHandler (\"onClientPlayerDamage\",getRootElement(),PlayerD)
toggleControl (\"next_weapon\",true)
toggleControl (\"previous_weapon\",true)
toggleControl (\"fire\",true)
end
end
addEventHandler (\"onClientColShapeLeave\",root,Leave)
addEventHandler (\"onClientColShapeHit\",root,hit)