-
Posts
1,411 -
Joined
-
Last visited
-
Days Won
2
Everything posted by WASSIm.
-
addEvent("onCheckZombie", true ) addEventHandler("onCheckZombie", root, function () -- Create zombies closed randomly players local pacecount = 0 while pacecount < 5*2 do --4 ZOMBIES AT A TIME TO PREVENT FPS DROP local tzombiecount = #everyZombie+pacecount if (tzombiecount < ZombieLimit) then local thePlayer = getRandomPlayer() if (thePlayer) and (exports["ZA-system"]:isPlayerLogin(thePlayer)) and not (getElementData(thePlayer, "zombieProof")) and not (isPedDead(thePlayer)) then local disc, angle = math.random(15, 50), math.random(360) local gx, gy = getDistanceRotation(0, 0, disc, angle) if not (hasPositionZombieProof(gx, gy)) then triggerClientEvent(thePlayer, "onClientPreZombieSpawn", thePlayer, gx, gy) pacecount = pacecount+1 end end end end -- Delete far away zombies local allplayers, listCloseZ = getElementsByType("player"), {} for ZombKey,theZomb in ipairs(everyZombie) do if (isZombie(theZomb)) and not (getElementData(theZomb, "forcedtoexist")) then local Zx, Zy, Zz = getElementPosition(theZomb) for _,thePlayer in ipairs(allplayers) do if (exports["ZA-system"]:isElementInRange(thePlayer, Zx, Zy, Zz, 75)) and not (listCloseZ[theZomb]) then listCloseZ[theZomb] = true end end if not (listCloseZ[theZomb]) then destroyElement(theZomb) end end end end)
-
Any help ?
-
Problem from setTimer
-
Hi guys, when i start script makes server high ping +2000 and keep show this in console [18:36:28] ERROR: Infinite/too long execution (ZA-zombies) [18:36:28] ERROR: ZA-zombies/server.lua:25: Aborting; infinite running script in ZA-zombies --RESOURCE START/INITIAL SETUP addEventHandler("onResourceStart", resourceRoot, function ( ) for _,thePlayer in ipairs(getElementsByType("player")) do bindKey(thePlayer, "fire", "down", function(source) local target = getPedTarget(source) if (target) and (getElementType(target) == "player") then setZombieBitten(source, target) end end) end setTimer(setangle, ZombieSpeedCheck, 0) -- KEEPS ZOMBIES FACING THE RIGHT DIRECTION setTimer(triggerEvent, 2000, 0, "onCheckZombie", root) --Clear far zombies & Spawns zombies in random locations end)
-
Same problem no such...
-
Now i got this: -bash: ./mta-server: No such file or directory
-
Hi guys i am back to MTA its mean i will back my server but when i start it its says ./mta-server: Permission denied so anyone can help me to solved this ??
-
You need change handling again when he is going backwards
-
5edma wa sabar
-
Hi guys i have question, what is different if make save data when player left server or when data changed ? ps: i save data with SQLite
-
i can't remove values ?
-
OMG i don't know that, thank you
-
but i use type and returning table
-
Hi guys i need help, i got that problem and i try anyway to sloved it but nothing ERROR: ZA-staff/server.lua:239: invaild value (boolean) at indox 5 in table for 'concat' addEvent("onAdminEditPanel", true) addEventHandler("onAdminEditPanel", root, function (command, ...) if (command) and (...) then local args = {...} for i, v in ipairs(args) do if type(v) == "boolean" then table.remove(args, i) end end setTimer(executeCommandHandler, 100, 1, "c"..command, source, table.concat(args, " ")) end end)
-
Thank you its work, But i have same problem from other code the seconded argument and other don't work if (string.sub(message, 1, 1) == "/") then local argcmd = split(message, " ") local command = tostring(argcmd[1]:gsub("/", "", 1)) table.remove(argcmd, 1) executeCommandHandler(command, source, unpack(argcmd)) triggerClientEvent(source, "onClientPlayerChatCommand", source, command, unpack(argcmd)) end
-
Walahi konet tnajam t7al topic 3alach la3waj
-
is better if use like this: local x, y, z = unpack(markers[math.random( #markers)]) local marker = createMarker(x, y, z, "cylinder", 1.5, 255, 255, 0, 170)
-
problem not on command kick, is on event onAdminEditPanel