-
Posts
732 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Bean666
-
hi , when i step on the marker the gui doesnt show up but i have set it already in the script is there any problem in this script? code: local marker1 = createMarker( -1152.5478515625, -955.203125, 129.21875, "Cylinder", 1.5, 0, 255, 0, 255) GUIEditor = { button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(368, 139, 581, 472, "Weapon Shop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 63, 562, 399, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Weapons", GUIEditor.tabpanel[1]) GUIEditor.button[1] = guiCreateButton(18, 42, 102, 44, "M4", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(184, 42, 102, 44, "AK47", false, GUIEditor.tab[1]) GUIEditor.button[3] = guiCreateButton(353, 42, 102, 44, "MP5", false, GUIEditor.tab[1]) GUIEditor.button[4] = guiCreateButton(353, 129, 102, 44, "Uzi", false, GUIEditor.tab[1]) GUIEditor.button[5] = guiCreateButton(184, 129, 102, 44, "Shotgun", false, GUIEditor.tab[1]) GUIEditor.button[6] = guiCreateButton(18, 129, 102, 44, "Spaz12", false, GUIEditor.tab[1]) GUIEditor.button[7] = guiCreateButton(18, 209, 102, 44, "Tec9", false, GUIEditor.tab[1]) GUIEditor.button[8] = guiCreateButton(184, 209, 102, 44, "Sniper", false, GUIEditor.tab[1]) GUIEditor.button[9] = guiCreateButton(353, 209, 102, 44, "Deagle", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Refill Health", GUIEditor.tabpanel[1]) GUIEditor.button[10] = guiCreateButton(164, 147, 227, 65, "Refill Health", false, GUIEditor.tab[2]) GUIEditor.button[11] = guiCreateButton(486, 44, 80, 34, "Close", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(148, 20, 242, 43, "Weapon Shop", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 35, 139, 219) GUIEditor.label[2] = guiCreateLabel(400, 20, 147, 16, "Weapon Shop By Shaman", false, GUIEditor.window[1]) addEventHandler("onClientMarkerHit", marker1, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientGUIClick",GUIEditor.button[11],function() if ( source == GUIEditor.button[11]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then showCursor(true) triggerServerEvent ("giveweaponm4",getLocalPlayer(),giveweaponm4) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[2],function() if ( source == GUIEditor.button[2]) then showCursor(true) triggerServerEvent ("giveweaponak47",getLocalPlayer(),giveweaponak47) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[3],function() if ( source == GUIEditor.button[3]) then showCursor(true) triggerServerEvent ("givelol",getLocalPlayer(),givelol) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[4],function() if ( source == GUIEditor.button[4]) then showCursor(true) triggerServerEvent ("giveweaponuzi",getLocalPlayer(),giveweaponuzi) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[5],function() if ( source == GUIEditor.button[5]) then showCursor(true) triggerServerEvent ("giveweaponshot",getLocalPlayer(),giveweaponshot) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[6],function() if ( source == GUIEditor.button[6]) then showCursor(true) triggerServerEvent ("giveweaponspaz",getLocalPlayer(),giveweaponspaz) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[7],function() if ( source == GUIEditor.button[7]) then showCursor(true) triggerServerEvent ("giveweapontec",getLocalPlayer(),giveweapontec) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[8],function() if ( source == GUIEditor.button[8]) then showCursor(true) triggerServerEvent ("giveweaponsniper",getLocalPlayer(),giveweaponsniper) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[9],function() if ( source == GUIEditor.button[9]) then showCursor(true) triggerServerEvent ("giveweapondeagle",getLocalPlayer(),giveweapondeagle) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[10],function() if ( source == GUIEditor.button[10]) then showCursor(true) triggerServerEvent ("givehp",getLocalPlayer(),givehp) end end )
-
hi , i need help , i had scripted a pickup system , and i made a GUI System once i get in a marker it shows the gui , and when it press the button which gives u item and destroys the marker , but when i click the button it gives me weapons , but destroys all the markers. any help? local marker1 = createMarker( 60.0234375, -1534.3251953125, 4.2, "Cylinder", 0.7, 0, 100, 0, 150) local marker2 = createMarker( 1177.5244140625, -1319.181640625, 13.2, "Cylinder", 0.7, 0, 100, 0, 150) local marker3 = createMarker( 735.3291015625, -1342.484375, 12.6, "Cylinder", 0.7, 0, 100, 0, 150) local marker4 = createMarker( -1419.8505859375, -1502.87109375, 104.2, "Cylinder", 0.7, 0, 100, 0, 150) local marker5 = createMarker( -90.94140625, -1576.6279296875, 1.7, "Cylinder", 0.7, 0, 100, 0, 150) GUIEditor = { button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(435, 236, 394, 317, "Item Leftover", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(124, 109, 142, 72, "First Aid Kit", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(130, 260, 136, 47, "Close", false, GUIEditor.window[1]) addEventHandler("onClientMarkerHit", marker1, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientMarkerHit", marker2, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientMarkerHit", marker3, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientMarkerHit", marker4, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientMarkerHit", marker5, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientGUIClick",GUIEditor.button[2],function() if ( source == GUIEditor.button[2]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) destroyElement(marker1) triggerServerEvent ("givehp",getLocalPlayer(),givehp) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) destroyElement(marker2) triggerServerEvent ("givehp",getLocalPlayer(),givehp) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) destroyElement(marker3) triggerServerEvent ("givehp",getLocalPlayer(),givehp) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) destroyElement(marker4) triggerServerEvent ("givehp",getLocalPlayer(),givehp) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) destroyElement(marker5) triggerServerEvent ("givehp",getLocalPlayer(),givehp) end end )
-
here's my code. markerTable = { --[[marker1: ]]{-1200.4541015625, -1035.0224609375, 129.1569519043, "Cylinder", 2, 255, 200, 0, 255}, --More markers if you want. } --Create/Respawn our marker in 5 seconds setTimer(function() marker1 = createMarker(markerTable[1][1], markerTable[1][2], markerTable[1][3], markerTable[1][4], markerTable[1][5], markerTable[1][6], markerTable[1][7], markerTable[1][8], markerTable[1][9]) end, 5000, 1) GUIEditor = { button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(435, 236, 394, 317, "Dead Soldier Inventory", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(124, 109, 142, 72, "M4", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(130, 260, 136, 47, "Close", false, GUIEditor.window[1]) addEventHandler("onClientMarkerHit", marker1, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientGUIClick",GUIEditor.button[2],function() if ( source == GUIEditor.button[2]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) destroyElement(marker1) triggerServerEvent ("giveweaponM4",getLocalPlayer(),giveweaponM4) end end )
-
i changed everything to Marker1 still doesnt work.
-
it worked or it respawns. . but when i step on the marker that respawned, GUI Doesnt show up.
-
where will i add this in the server.lua or in the client?
-
hi, i've been working on my pickup system, when a player clicks the button it gives him a weapon and destroys the marker... is there anyway to let this marker respawn for some time? any help appreciated Code: client.lua local marker = createMarker( -1200.4541015625, -1035.0224609375, 129.1569519043, "Cylinder", 2, 255, 200, 0, 255) GUIEditor = { button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(435, 236, 394, 317, "Dead Soldier Inventory", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(124, 109, 142, 72, "M4", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(130, 260, 136, 47, "Close", false, GUIEditor.window[1]) addEventHandler("onClientMarkerHit", marker, function(player) if (player == localPlayer) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end) addEventHandler("onClientGUIClick",GUIEditor.button[2],function() if ( source == GUIEditor.button[2]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end ) addEventHandler("onClientGUIClick",GUIEditor.button[1],function() if ( source == GUIEditor.button[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) destroyElement(marker) triggerServerEvent("giveweaponM4", root) end end ) Server.lua function giveweaponM4 (thePlayer) -- Theme --giveWeapon (thePlayer, weaponID, ammo) giveWeapon ( source, 31, 150 ) -- takePlayerMoney (thePlayer, price) outputChatBox("You Have Picked up an M4!",thePlayer, 0,255,0) end addCommandHandler("M4", giveweaponM4) addEvent("giveweaponM4", true) addEventHandler("giveweaponM4", resourceRoot, giveweaponM4)
-
Doesnt Work. i tried it but still i can see from far.
-
people said , setBlipVisibleDistance is kinda buggy. so idk let me try.
-
hi , i need help in my vehicle blips help . because i have created a blip, i have set the distance . but when i go far . it's still visible in radar. how can i fix this? px,py,pz = getElementPosition( getLocalPlayer() ) vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do carx,cary,carz = getElementPosition( vehicleValue ) pcDist = getDistanceBetweenPoints2D ( px, py, carx, cary ) if pcDist <= 100.0 then blip = createBlipAttachedTo ( vehicleValue, 0, 1, 100, 100, 100, 255, 100.0 ) end end
-
hmm.. try learning some functions. and what do u mean . like Second Rhino
-
Xeon , doesnt work for me.. it chats but still allows normal players to do the command .
-
i need help with the /ad command because all players can use it , i tried to use isObjectinACLGroup but i'd some problem with it . Code: function Announcement(thePlayer, commandName, ...) local players = getElementsByType("player") local playerName = getPlayerName ( thePlayer ) local chatContent = {...} for index, player in ipairs ( players ) do outputChatBox( "Announcement from " .. playerName.. ": " ..table.concat ( chatContent, " "), player, 255, 190, 105) end end addCommandHandler( "ad", Announcement )
-
good work keep it up
-
Darhal ur code doesnt work dude...
-
lmao , i shoot zombies in the body , they dont get dmged , i shoot them in the head , they go headless and still walks , and until i shoot them in the head again and again to die
-
please give me an example. idk where to put it.
-
but wtf , when i shoot them at the body , 1 hit? how to change this
-
srry , when i shoot the zombie in the body , it works it gets killed , but head explodes.
-
hi , Slothman's zombie script , when i shoot the zombie in the body , it doesnt get damaged? is there anyway to fix this? here is my code: zombie_server.lua ZombieLimit = get("zombies.MaxZombies")-- HOW MANY ZOMBIES SHOULD EXIST AT MAXIMUM? ZombieStreaming = get("zombies.StreamMethod") -- 1 to constantly stream zombies, 0 to only allow zombies to spawn via createZombie function, 2 to only allow spawning at set spawnpoints ZombiePedSkins = {13,22,56,67,68,69,70,92,97,105,107,108,126,127,128,152,162,167,188,195,206,209,212,229,230,258,264,277,280,287 } --ALTERNATE SKIN LISTS FOR ZOMBIES (SHORTER LIST IS TEXTURED ZOMBIES ONLY) --ZombiePedSkins = {7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,36,37,38,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,75,76,77,78,79,80,81,82,83,85,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,112,113,114,115,116,117,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,158,159,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,209,210,211,212,213,214,215,216,217,218,219,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,275,276,277,278,279,280,281,282,283,284,285,286,287,288 } ZombieSpeed = get("zombies.Speed") if ZombieSpeed == 0 then --super slow zombies (goofy looking) chaseanim = "WALK_drunk" checkspeed = 2000 elseif ZombieSpeed == 1 then -- normal speed chaseanim = "run_old" checkspeed = 1000 elseif ZombieSpeed == 2 then -- rocket zombies (possibly stressful on server) chaseanim = "sprint_panic" checkspeed = 680 else -- defaults back to normal chaseanim = "run_old" checkspeed = 1000 end resourceRoot = getResourceRootElement() moancount =0 moanlimit = 10 everyZombie = { } --IDLE BEHAVIOUR OF A ZOMBIE function Zomb_Idle (ped) if isElement(ped) then if ( getElementData ( ped, "status" ) == "idle" ) and ( isPedDead ( ped ) == false ) and (getElementData (ped, "zombie") == true) then local action = math.random( 1, 6 ) if action < 4 then -- walk a random direction local rdmangle = math.random( 1, 359 ) setPedRotation( ped, rdmangle ) setPedAnimation ( ped, "PED", "Player_Sneak", -1, true, true, true) setTimer ( Zomb_Idle, 7000, 1, ped ) elseif action == 4 then -- get on the ground setPedAnimation ( ped, "MEDIC", "cpr", -1, false, true, true) setTimer ( Zomb_Idle, 4000, 1, ped ) elseif action == 5 then -- stand still doing nothing setPedAnimation ( ped ) setTimer ( Zomb_Idle, 4000, 1, ped ) end end end end --BEHAVIOUR WHILE CHASING PLAYERS function Zomb_chase (ped, Zx, Zy, Zz ) if isElement(ped) then if (getElementData ( ped, "status" ) == "chasing") and (getElementData (ped, "zombie") == true) then local x, y, z = getElementPosition( ped ) if (getElementData ( ped, "target" ) == nil) and getElementData ( ped, "Tx" ) ~= false then local Px = getElementData ( ped, "Tx" ) local Py = getElementData ( ped, "Ty" ) local Pz = getElementData ( ped, "Tz" ) local Pdistance = (getDistanceBetweenPoints3D( Px, Py, Pz, x, y, z )) if (Pdistance < 1.5 ) then setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 2000, 1, ped ) end end local distance = (getDistanceBetweenPoints3D( x, y, z, Zx, Zy, Zz )) if (distance < 1 ) then -- IF THE PED HASNT MOVED if (getElementData ( ped, "target" ) == nil) then local giveup = math.random( 1, 15 ) if giveup == 1 then setElementData ( ped, "status", "idle" ) else local action = math.random( 1, 2 ) if action == 1 then setPedAnimation ( ped ) triggerClientEvent ( "Zomb_Punch", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", chaseanim, -1, true, true, true ) end end, 800, 1, ped ) setTimer ( Zomb_chase, 2000, 1, ped, x, y, z ) elseif action == 2 then setPedAnimation ( ped ) triggerClientEvent ( "Zomb_Jump", getRootElement(), ped ) setTimer ( Zomb_chase, 3500, 1, ped, x, y, z ) end end else local Ptarget = (getElementData ( ped, "target" )) if isElement(Ptarget) then local Px, Py, Pz = getElementPosition( Ptarget ) local Pdistance = (getDistanceBetweenPoints3D( Px, Py, Pz, Zx, Zy, Zz )) if (Pdistance < 1.2 ) then -- ATTACK A PLAYER IF THEY ARE CLOSE if ( isPedDead ( Ptarget ) ) then --EAT A DEAD PLAYER setPedAnimation ( ped ) setPedAnimation ( ped, "MEDIC", "cpr", -1, false, true, false) setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 10000, 1, ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedRotation ( ped, getPedRotation(ped)-180) end end, 10000, 1, ped ) zmoan(ped) else local action = math.random( 1, 6 ) if action == 1 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Jump", getRootElement(), ped ) setTimer ( Zomb_chase, 2000, 1, ped, x, y, z ) else setPedAnimation ( ped) triggerClientEvent ( "Zomb_Punch", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", chaseanim, -1, true, true, true ) end end, 800, 1, ped ) setTimer ( Zomb_chase, 2000, 1, ped, x, y, z ) end end else if ( isPedDead (Ptarget) ) then setTimer ( function (ped) if ( isElement ( ped ) ) then setElementData ( ped, "status", "idle" ) end end, 2000, 1, ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedRotation ( ped, getPedRotation(ped)-180) end end, 1800, 1, ped ) else local action = math.random( 1, 2 ) if action == 1 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Punch", getRootElement(), ped ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedAnimation ( ped, "ped", chaseanim, -1, true, true, true ) end end, 800, 1, ped ) setTimer ( Zomb_chase, 2000, 1, ped, x, y, z ) elseif action == 2 then setPedAnimation ( ped) triggerClientEvent ( "Zomb_Jump", getRootElement(), ped ) setTimer ( Zomb_chase, 2000, 1, ped, x, y, z ) end end end else setElementData ( ped, "status", "idle" ) end end else setPedAnimation ( ped, "ped", chaseanim, -1, true, true, true) --KEEP WALKING setTimer ( Zomb_chase, checkspeed, 1, ped, x, y, z ) --CHECK AGAIN end end end end --SET THE DIRECTION OF THE ZOMBIE function setangle () for theKey,ped in ipairs(everyZombie) do if isElement(ped) then if ( getElementData ( ped, "status" ) == "chasing" ) then local x local y local z local px local py local pz if ( getElementData ( ped, "target" ) ~= nil ) then local ptarget = getElementData ( ped, "target" ) if isElement(ptarget) then x, y, z = getElementPosition( ptarget ) px, py, pz = getElementPosition( ped ) else setElementData ( ped, "status", "idle" ) x, y, z = getElementPosition( ped ) px, py, pz = getElementPosition( ped ) end zombangle = ( 360 - math.deg ( math.atan2 ( ( x - px ), ( y - py ) ) ) ) % 360 --MAGIC SPELL TO MAKE PEDS LOOK AT YOU setPedRotation( ped, zombangle ) elseif ( getElementData ( ped, "target" ) == nil ) and (getElementData ( ped, "Tx" ) ~= false) then --IF THE PED IS AFTER THE PLAYERS LAST KNOWN WHEREABOUTS x = getElementData ( ped, "Tx" ) y = getElementData ( ped, "Ty" ) z = getElementData ( ped, "Tz" ) px, py, pz = getElementPosition( ped ) zombangle = ( 360 - math.deg ( math.atan2 ( ( x - px ), ( y - py ) ) ) ) % 360 --MAGIC SPELL TO MAKE PEDS LOOK AT YOU setPedRotation( ped, zombangle ) end end end end end --SETS THE ZOMBIE ACTIVITY WHEN STATUS CHANGES addEventHandler ( "onElementDataChange", getRootElement(), function ( dataName ) if getElementType ( source ) == "ped" and dataName == "status" then if (getElementData (source, "zombie") == true) then if ( isPedDead ( source ) == false ) then if (getElementData ( source, "status" ) == "chasing" ) then local Zx, Zy, Zz = getElementPosition( source ) setTimer ( Zomb_chase, 1000, 1, source, Zx, Zy, Zz ) local newtarget = (getElementData ( source, "target" )) if isElement (newtarget) then if getElementType ( newtarget ) == "player" then setElementSyncer ( source, newtarget ) end end zmoan(source) elseif (getElementData ( source, "status" ) == "idle" ) then setTimer ( Zomb_Idle, 1000, 1, source) elseif (getElementData ( source, "status" ) == "throatslashing" ) then local tx,ty,tz = getElementPosition( source ) local ptarget = getElementData ( source, "target" ) if isElement(ptarget) then local vx,vy,vz = getElementPosition( ptarget ) local zombdistance = (getDistanceBetweenPoints3D (tx, ty, tz, vx, vy, vz)) if (zombdistance < . then zmoan(source) setPedAnimation ( source, "knife", "KILL_Knife_Player", -1, false, false, true) setPedAnimation ( ptarget, "knife", "KILL_Knife_Ped_Damage", -1, false, false, true) setTimer ( Playerthroatbitten, 2300, 1, ptarget, source) setTimer ( function (source) if ( isElement ( source ) ) then setElementData ( source, "status", "idle" ) end end, 5000, 1, source ) else setElementData ( source, "status", "idle" ) end else setElementData ( source, "status", "idle" ) end end elseif (getElementData ( source, "status" ) == "dead" ) then setTimer ( Zomb_delete, 10000, 1, source) end end end end) --RESOURCE START/INITIAL SETUP function outbreak(startedResource) newZombieLimit = get("" .. getResourceName(startedResource) .. ".Zlimit") if newZombieLimit ~= false then if newZombieLimit > ZombieLimit then newZombieLimit = ZombieLimit end else newZombieLimit = ZombieLimit end WoodTimer = setTimer ( WoodSetup, 2000, 1) -- CHECKS FOR BARRIERS if startedResource == getThisResource() then -- call(getResourceFromName("scoreboard"), "scoreboardAddColumn", "Zombie kills") --ADDS TO SCOREBOARD local allplayers = getElementsByType ( "player" ) for pKey,thep in ipairs(allplayers) do setElementData ( thep, "dangercount", 0 ) end local alivePlayers = getAlivePlayers () for playerKey, playerValue in ipairs(alivePlayers) do setElementData ( playerValue, "alreadyspawned", true ) end if ZombieSpeed == 2 then MainTimer1 = setTimer ( setangle, 200, 0) -- KEEPS ZOMBIES FACING THE RIGHT DIRECTION (fast) else MainTimer1 = setTimer ( setangle, 400, 0) -- KEEPS ZOMBIES FACING THE RIGHT DIRECTION end MainTimer3 = setTimer ( clearFarZombies, 3000, 0) --KEEPS ALL THE ZOMBIES CLOSE TO PLAYERS if ZombieStreaming == 1 then MainTimer2 = setTimer ( SpawnZombie, 2500, 0 ) --Spawns zombies in random locations elseif ZombieStreaming == 2 then MainTimer2 = setTimer ( SpawnpointZombie, 2500, 0 ) --spawns zombies in zombie spawnpoints end end end addEventHandler("onResourceStart", getRootElement(), outbreak) function player_Connect() setElementData ( source, "dangercount", 0 ) end addEventHandler ( "onPlayerConnect", getRootElement(), player_Connect )
-
it worked but i can see it even im far , it created a blip but i can see it even im so far.
-
still doesnt work lol