Jump to content

vn007322815

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

vn007322815's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. TankPedSkins = {44,45,46,47,48 } --ALTERNATE SKIN LISTS FOR ZOMBIES (SHORTER LIST IS TEXTURED ZOMBIES ONLY) setElementData(getRootElement(),"tankstotal",0) setElementData(getRootElement(),"tanksalive",0) createTeam("Tanks") itemTableTanks = { {"Box of Matches",328,0.4,90,5}, {"Wood Pile",1463,0.4,0,5}, {"M1911",346,1,90,0.4}, {"M9 SD",347,1,90,0.4}, {"Winchester 1866",349,1,90,0.4}, {"PDW",352,1,90,0.3}, {"Hunting Knife",335,1,90,7}, {"Hatchet",339,1,90,7}, {"Pizza",1582,1,0,7}, {"Soda Bottle",2647,1,0,7}, {"Empty Gas Canister",1650,1,0,5}, {"Roadflare",324,1,90,9}, {"Milk",2856,1,0,5}, {"Assault Pack (ACU)",3026,0.5,0,6}, {"Painkiller",2709,0.5,0,7}, {"Empty Soda Cans",2673,0.5,0,6}, {"Scruffy Burgers",2675,0.5,0,6}, {"Grenade",342,1,0,0.5}, {"Desert Eagle",348,1,90,0.3}, {"Sawn-Off Shotgun",350,1,90,0.2}, {"SPAZ-12 Combat Shotgun",351,1,90,0.2}, {"MP5A5",353,1,90,0.1}, {"Watch",2710,1,0,3}, {"Heat Pack",1576,1,0,6}, {"Wire Fence",933,0.25,0,1}, {"Lee Enfield",357,1,90,0.2}, {"Alice Pack",3026,1,0,0.5}, {"Tire",1073,1,0,1}, {"Morphine",1579,1,0,2}, {"Civilian Clothing",1577,1,0,12}, {"Map",1277,0.8,90,4}, {"GPS",2976,0.15,0,1}, {"Pasta Can",2770,0.1,0,5}, {"Beans Can",2601,1,0,5}, {"Burger",2768,1,0,2}, {"Radio Device",2966,0.5,0,3}, {"Golf Club",333,1,90,0.5}, {"Baseball Bat",336,1,90,0.5}, {"Shovel",337,1,90,0.5}, } function createTankTable (player) --createtabel setElementData(player,"playerTanks",{"no","no","no","no","no","no","no","no","no"}) setElementData(player,"spawnedtanks",0) end function createTankForPlayer (x,y,z) x,y,z = getElementPosition(source) counter = 0 if getElementData(source,"lasttankspawnposition") then local xL,yL,zL = getElementData(source,"lasttankspawnposition")[1] or false,getElementData(source,"lasttankspawnposition")[2] or false,getElementData(source,"lasttankspawnposition")[3] or false if xL then if getDistanceBetweenPoints3D (x,y,z,xL,yL,zL) < 50 then --outputChatBox("Server: canceled zombie create (reason: is near old position)") return end end end if getElementData(source,"spawnedtanks")+3 <= gameplayVariables.playertanks then -- If spawned zombies + 3 lower or equal to 9 -> Create zombies -> Increase digit (default: 9) to let more zombies spawn. WARNING: THE HIGHER THE VALUE, THE MORE LAG CAN OCCUR! for i = 1, gameplayVariables.amounttanks do --Amount of zombies to be spawned (default: 3) WARNING: THE HIGHER THE VALUE, THE MORE LAG CAN OCCUR! counter = counter+1 local number1 = math.random(-50,50) local number2 = math.random(-50,50) if number1 < 18 and number1 > -18 then number1 = 20 end if number2 < 18 and number2 > -18 then number2 = -20 end randomTskin = math.random ( 1, table.getn ( TankPedSkins ) ) tank = call (getResourceFromName("slothbot"),"spawnBot",x+number1,y+number2,z,math.random(0,360),TankPedSkins[randomTskin],0,0,getTeamFromName("Tanks")) setElementData(tank,"tank",true) setElementData(tank,"blood",gameplayVariables["tankblood"]) -- [iD:0000009 - Zombie menace] //L setElementData(tank,"owner",source) call ( getResourceFromName ( "slothbot" ), "setBotGuard", tank, x+number1,y+number2,z, false) --outputChatBox("Server: zombie created (reason: )") ------------------- end setElementData(source,"lasttankspawnposition",{x,y,z}) setElementData(source,"spawnedtanks",getElementData(source,"spawnedtanks")+3) end end addEvent("createTankForPlayer",true) addEventHandler("createTankForPlayer",getRootElement(),createTankForPlayer) function tankCheck1 () for i,ped in ipairs(getElementsByType("ped")) do if getElementData(ped,"tank") then goReturn = false local tankCreator = getElementData(ped,"owner") if not isElement(tankCreator) then outputDebugString("test") setElementData ( ped, "status", "dead" ) setElementData ( ped, "target", nil ) setElementData ( ped, "leader", nil ) destroyElement(ped) goReturn = true end if not goReturn then local xZ,yZ,zZ = getElementPosition(getElementData(ped,"owner")) local x,y,z = getElementPosition(ped) if getDistanceBetweenPoints3D (x,y,z,xZ,yZ,zZ) > 60 then if getElementData(tankCreator,"spawnedtanks")-1 >= 0 then setElementData(tankCreator,"spawnedtanks",getElementData(tankCreator,"spawnedtanks")-1) end setElementData ( ped, "status", "dead" ) setElementData ( ped, "target", nil ) setElementData ( ped, "leader", nil ) destroyElement(ped) end end end end end setTimer(tankCheck1,20000,0) function botAttack (ped) call ( getResourceFromName ( "slothbot" ), "setBotFollow", ped, source) end addEvent("botAttack",true) addEventHandler("botAttack",getRootElement(),botAttack) function botStopFollow (ped) local x,y,z = getElementPositon(ped) call ( getResourceFromName ( "slothbot" ), "setBotGuard", ped, x, y, z, false) end addEvent("botStopFollow",true) addEventHandler("botStopFollow",getRootElement(),botStopFollow) function outputChange(dataName,oldValue) if getElementType(source) == "player" then -- check if the element is a player if dataName == "spawnedtanks" then local newValue = getElementData(source,dataName) -- find the new value outputChatBox(oldValue.." to "..newValue) -- output the change for the affected player end end end --addEventHandler("onElementDataChange",getRootElement(),outputChange) function destroyTable () for i,ped in ipairs(getElementsByType("ped")) do if getElementData(ped,"tank") then if getElementData(ped,"owner") == source then setElementData(getElementData(ped,"owner"),"spawnedtanks",getElementData(getElementData(ped,"owner"),"spawnedtanks")-1) setElementData ( ped, "status", "dead" ) setElementData ( ped, "target", nil ) setElementData ( ped, "leader", nil ) destroyElement(ped) end end end end --addEventHandler("kilLDayZPlayer",getRootElement(),destroyTable) --addEventHandler("onPlayerQuit",getRootElement(),destroyTable) function destroyDeadTank (ped,pedCol) destroyElement(ped) destroyElement(pedCol) end function tankKilled (killer,headshot) --outputChatBox("Server: destroyed zombie (reason: zombie died)") if killer then setElementData(killer,"tankskilled",getElementData(killer,"tankskilled")+1) end local skin = getElementModel(source) local x,y,z = getElementPosition(source) local ped = createPed(skin,x,y,z) local pedCol = createColSphere(x,y,z,1.5) killPed(ped) setTimer(destroyDeadTank,360000 ,1,ped,pedCol) attachElements (pedCol,ped,0,0,0) setElementData(pedCol,"parent",ped) setElementData(pedCol,"playername","Tank") setElementData(pedCol,"deadman",true) setElementData(ped,"deadtank",true) setElementData(pedCol,"deadman",true) local time = getRealTime() local hours = time.hour local minutes = time.minute setElementData(pedCol,"deadreason","Looks like it's finally dead. Estimated time of death: "..hours..":"..minutes.." o'clock.") for i, item in ipairs(itemTableTanks) do local value = math.percentChance (item[5]/2.5,1) setElementData(pedCol,item[1],value) --weapon Ammo local ammoData,weapID = getWeaponAmmoType (item[1],true) if ammoData and value > 0 then setElementData(pedCol,ammoData,1) end end local tankCreator = getElementData(source,"owner") setElementData(tankCreator,"spawnedtanks",getElementData(tankCreator,"spawnedtanks")-1) destroyElement(source) if headshot == true then setElementData(killer,"headshots",getElementData(killer,"headshots")+1) end end addEvent("onTankGetsKilled",true) addEventHandler("onTankGetsKilled",getRootElement(),tankKilled) boss.lua:67: attempt to perform arithmetic on a boolean value gameplayVariables = {} gameplayVariables["zombieblood"] = 3000 -- Zombie Blood/Health - DEFAULT: 6000 gameplayVariables["tankblood"] = 15000 -- gameplayVariables["foodrestore"] = math.random(50,100) -- Amount of hunger to be restored when eating - DEFAULT: math.random(40,100) - FOR FULL RESTORE, JUST WRITE 100 gameplayVariables["thirstrestore"] = math.random(50,100) -- Amount of hunger to be restored when drinking - DEFAULT: math.random(40,100) - FOR FULL RESTORE, JUST WRITE 100 gameplayVariables["loseHunger"] = -1.5 -- Amount of losing hunger per minute - DEFAULT: -1.5 gameplayVariables["loseThirst"] = -1.5 -- Amount of losing thirst per minute - DEFAULT: -1.5 gameplayVariables["playerzombies"] = 1 -- Amount of spawning zombies per player - DEFAULT: 3 - THE HIGHER THIS VALUE, THE MORE LAG CAN OCCUR! gameplayVariables["amountzombies"] = 2 -- Amount of zombies - DEFAULT: 4 - THE HIGHER THIS VALUE, THE MORE LAG CAN OCCUR! gameplayVariables["playertanks"] = 3 -- gameplayVariables["amounttanks"] = 5 pls help me
  2. How can I prevent any player on any of my servers and they can not change the name?
  3. thank u so much solidsnake14 for support . i have a question can you help me?
  4. in my server . i and my friend creatve group , everything ok but i have one problem . if i open map and i see only his with icon . i don't know how so that when I turn on the map icon and can see his name appear on the map . pls help
  5. can someone help me? how to be able to see the map of the member in the group name? . I look forward to the support from you. thank you
  6. BossPedSkins = { 1, 2 } setElementData(getRootElement(), "bosstotal", 0) setElementData(getRootElement(), "bossalive", 0) createTeam("bosss") itemTableBoss = { { "Box of Matches", 328, 0.4, 90, 5 }, { "Wood Pile", 1463, 0.4, 0, 5 }, { "M1911", 346, 1, 90, 0.4 }, { "M9 SD", 347, 1, 90, 0.4 }, { "Winchester 1866", 349, 1, 90, 0.4 }, { "PDW", 352, 1, 90, 0.3 }, { "Hunting Knife", 335, 1, 90, 7 }, { "Hatchet", 339, 1, 90, 7 }, { "Pizza", 1582, 1, 0, 7 }, { "Soda Bottle", 2647, 1, 0, 7 }, { "Empty Gas Canister", 1650, 1, 0, 5 }, { "Roadflare", 324, 1, 90, 9 }, { "Milk", 2856, 1, 0, 5 }, { "Assault Pack (ACU)", 3026, 0.5, 0, 6 }, { "Painkiller", 2709, 0.5, 0, 7 }, { "Empty Soda Cans", 2673, 0.5, 0, 6 }, { "Scruffy Burgers", 2675, 0.5, 0, 6 }, { "Grenade", 342, 1, 0, 0.5 }, { "Desert Eagle", 348, 1, 90, 0.3 }, { "Sawn-Off Shotgun", 350, 1, 90, 0.2 }, { "SPAZ-12 Combat Shotgun", 351, 1, 90, 0.2 }, { "MP5A5", 353, 1, 90, 0.1 }, { "Watch", 2710, 1, 0, 3 }, { "Heat Pack", 1576, 1, 0, 6 }, { "Wire Fence", 933, 0.25, 0, 1 }, { "Lee Enfield", 357, 1, 90, 0.2 }, { "Alice Pack", 3026, 1, 0, 0.5 }, { "Tire", 1073, 1, 0, 1 }, { "Morphine", 1579, 1, 0, 2 }, { "Civilian Clothing", 1577, 1, 0, 12 }, { "Map", 1277, 0.8, 90, 4 }, { "GPS", 2976, 0.15, 0, 1 }, { "Pasta Can", 2770, 0.1, 0, 5 }, { "Beans Can", 2601, 1, 0, 5 }, { "Burger", 2768, 1, 0,
  7. vn007322815

    aim down sights

    How can I give this function on my server? it looks like this : pls help me
×
×
  • Create New...