-
Posts
1,134 -
Joined
-
Last visited
-
Days Won
37
Everything posted by NeXuS™
-
How are zombies created?
-
I think the best way to ask those questions would be on here. Maybe some of us can answer it too.
-
Are you using slothbot for the bots?
-
local timerTable = {} addEventHandler('onColShapeHit', pColshape, function(pHitElement, ped) if getElementType(pHitElement) == 'player' then if getElementData(pHitElement,"boss") ~= true then textDisplayAddObserver(display, pHitElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData(pHitElement, 'damage', 'no') end timerTable[pHitElement] = setTimer(function() for i, k in pairs(getElementsByType("ped")) do if getElementData(k, "zombie") then if getElementData(k, "target") == pHitElement then -- You may have to change this. destroyElement(k) end end end end, 500, 0) end elseif getElementType(pHitElement) == 'ped' then -- check if the entered ped kill it local aa = getElementData(pHitElement, "zombie") if getElementData(pHitElement, "zombie") then if getElementData(pHitElement,"boss") ~= true then destroyElement(pHitElement, aa) -- THIS ONE DISAPPEAR THE ZOMBIE WHEN JOIN THE SAFE ZONE end end end end) addEventHandler("onColShapeLeave", pColshape, function(hitElement) if isTimer(timerTable[hitElement]) then killTimer(timeTable[hitElement]) timerTable[hitElement] = nil end end) What about this?
-
addEventHandler('onColShapeHit', pColshape, function(pHitElement, ped) if getElementType(pHitElement) == 'player' then if getElementData(pHitElement,"boss") ~= true then textDisplayAddObserver(display, pHitElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData(pHitElement, 'damage', 'no') end for i, k in pairs(getElementsByType("ped")) do if getElementData(k, "zombie") then if getElementData(k, "target") == pHitElement then -- You may have to change this. destroyElement(k) end end end end elseif getElementType(pHitElement) == 'ped' then -- check if the entered ped kill it local aa = getElementData(pHitElement, "zombie") if getElementData(pHitElement, "zombie") then if getElementData(pHitElement,"boss") ~= true then destroyElement(pHitElement, aa) -- THIS ONE DISAPPEAR THE ZOMBIE WHEN JOIN THE SAFE ZONE end end end end) Try this.
-
I don't get what you are trying to do it. When a player enters a safe zone, kill all zombies on the map?
-
I don't think he is trying to achieve drawing it on the other side of the rectangle.
-
Because detection is client-sided. You could move the detection from the hit person to the shooter, and set the hit person's health by that. Unless you do that, the detection is on the hit player's side, which causes the seen problem.
-
You could, by modifying the group system. But if you don't want to, I suppose you can somehow get the player's group.
-
What do you mean "moving backwards"?
-
You'll have to create a team with createTeam and add players to it. Whenever someone enters a base, you'll have to check with getPlayerTeam, if his team equals to the base's team (which could be saved in an elementData with setElementData), if not, adding a timer, which would kill the player. You'll have to check if he leaves this area tho, so you can kill the timer.
-
local screenW, screenH = guiGetScreenSize() local loadPercent = 0 addEventHandler("onClientRender", root, function() if loadPercent < 100 then loadPercent = loadPercent + 1 end dxDrawRectangle(screenW * 0.3280, screenH * 0.4609, 469, 45, tocolor(0, 0, 0, 169), false) dxDrawLine(screenW * 0.3280, screenH * 0.4609, (screenW * 0.3280) + 469, ( screenH * 0.4609) + 0, tocolor(0, 0, 0, 254), 2, false) dxDrawLine(screenW * 0.3280, screenH * 0.5195, (screenW * 0.3280) + 469, ( screenH * 0.5195) + 0, tocolor(0, 0, 0, 254), 2, false) dxDrawLine(screenW * 0.6713, screenH * 0.4609, (screenW * 0.6713) + 0, ( screenH * 0.4609) + 45, tocolor(0, 0, 0, 254), 2, false) dxDrawLine((screenW * 0.3272) + 1, screenH * 0.4609, screenW * 0.3272, ( screenH * 0.4609) + 44, tocolor(0, 0, 0, 254), 2, false) dxDrawRectangle(screenW * 0.3280, screenH * 0.4609, 469/100*loadPercent, 45, tocolor(12, 251, 1, 254), false) ----dxDrawLoading - Green bar dxDrawText("Hacking the safe", 541 - 1, 370 - 1, 917 - 1, 399 - 1, tocolor(0, 0, 0, 255), 0.60, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Hacking the safe", 541 + 1, 370 - 1, 917 + 1, 399 - 1, tocolor(0, 0, 0, 255), 0.60, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Hacking the safe", 541 - 1, 370 + 1, 917 - 1, 399 + 1, tocolor(0, 0, 0, 255), 0.60, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Hacking the safe", 541 + 1, 370 + 1, 917 + 1, 399 + 1, tocolor(0, 0, 0, 255), 0.60, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Hacking the safe", screenW * 0.3960, screenH * 0.4818, (screenW * 0.3960) + 376, ( screenH * 0.4818) + 29, tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", false, false, false, false, false) end) Try to understand the code.
-
Your code has to be somewhere wrong. val = string.find("MyName", "%A") outputChatBox(tostring(val)) -- nil val = string.find("MyName/", "%A") outputChatBox(tostring(val)) -- 7
-
What about string.find(theText, "%A")
-
You can create it with a thousand methods. getTickCount, creating a timer which switches a boolean's value, etc.
-
Getting the screen size by guiGetScreenSize and calculating with that.
-
Because you use absolute values. Probably they have a lower screen resolution and the Y coordinate (827) is out of their actual screen.
-
function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x, y + 1, w + 1 , h , tocolor ( 0, 0, 0, 220 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, true ) end function renderName() local pX, pY, pZ = getElementPosition(localPlayer) local wX, wY = getScreenFromWorldPosition(pX, pY, pZ+1) local playerNick = getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", "") dxDrawBorderedText(playerNick, wX, wY, wX, wY, tocolor(255, 255, 255, 255), 1, "default", "center", "top", false, false, false, true, false) end addEventHandler("onClientRender", root, renderName) This works totally fine for me.
-
Line nr. 16 local query = dbQuery(myqsl_kapcsolat, ...) to local query = dbQuery(mysql_kapcsolat, ...)
- 9 replies
-
- mta
- connection
-
(and 7 more)
Tagged with: