Jump to content

Lachuks

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by Lachuks

  1. Yes. MTADiag - http://pastebin.mtasa.com/848013655
  2. Same problem here. Sometimes it's getting fixed when I minimize MTA and then maximize it again. But when I do the same again it's lagging same as before. When it's lagging. Those bug jumps are because of moving mouse. Sometimes after that minimize/maximize thing that I mentioned upper.
  3. Same problem here. But not only mouse is lagging but whole game. Any ideas how to solve it? http://pastebin.mtasa.com/625240022
  4. 100% replaced with 75%. Can't fix veh to 100% Fixed ( Had also to replace /100*carhp with /75*carhp )
  5. Hello, there! I'm up to make a speedometer but found some kind of problem. When vehicle is on ~25% it starts flaming and blowing up. How to make veh flaming when it's on 0%? Code
  6. Thank you! Works exelent now
  7. I removed that loop but stil same problem.
  8. Hello! Recentrly started working on protect system and added vehicle limit in colshape but something went wrong and it does not work as I wanted to. When arena reach limit all vehicles in whole map teleport in 1 point. I hope you understand what I mean. local colshapepos = {-2633.27832, -39.11388, 1.76461, 18.8447265625, 9.484432220459, 6.1000002861023} local kickpos = {-2602.0732421875, -44.96484375, 4.1796875} local maxvehs = 1 local grupnos = "sss" local co4 = createColCuboid(colshapepos[1], colshapepos[2], colshapepos[3], colshapepos[4], colshapepos[5], colshapepos[6]) setElementID (co4, grupnos) function checkVehicles(theElement) local counter = #getElementsWithinColShape(source, "vehicle") local vehicles = getElementsByType ( "vehicle" ) if counter < maxvehs then elseif counter > maxvehs then for vehicleKey, vehicleValue in ipairs(vehicles) do setElementPosition(theElement, kickpos[1], kickpos[2], kickpos[3]) setElementFrozen(theElement, true) setElementFrozen(theElement, false) end end end addEventHandler("onColShapeHit", getRootElement(), checkVehicles)
  9. Lachuks

    dx list

    I forgot to add local valoda = " " Thank you! ^.^ Works great
  10. Lachuks

    dx list

    Thank you for help but it's not working.
  11. Lachuks

    dx list

    Hello there! Tryed to make stats script but... I don't understand how to make dx list. It shows only 1 language when my character know ~2. Hope you can understand what I mean. It should look like this Code
  12. Works great. Thank you! Lol. Allways when problem is solved it looks so easy.
  13. I have added that event before. Same effect. Any help?
  14. Hello there! Recently I made level system for my server and I wanted to add more features to it but I don't know how to make it done. I wanted to make notification when level up. I made code but when I level up it shows only for ~0.5 seconds. I wanted to make it show for ~5 seconds. I don't understand how timers work that's why it's hard for me. Hope you can help me and maybe explain how does it works. Server: addEventHandler("onElementDataChange", getRootElement(), function (dataName) if (getElementType(source) == "player") and (dataName == "experience") then local theAccount = getPlayerAccount(source) if (theAccount) and not (isGuestAccount(theAccount)) then local level = getElementData(source, "level") local experience = getElementData(source, "experience") local experience_r = getElementData(source, "experience_r") if (experience >= experience_r) then local newLvl = level+1 local experience_rnl = exprequired[newLvl] if (experience_rnl) then local amountbonus = experience-experience_r setElementData(source, "level", newLvl) setElementData(source, "experience", 0) setElementData(source, "experience_r", experience_rnl) triggerClientEvent(source, "onClientLevelUp",source) else setElementData(source, "experience", experience_r) end end setAccountData(theAccount, "level", getElementData(source, "level")) setAccountData(theAccount, "experience", getElementData(source, "experience")) end end end) Client: function newLvl() newLvl = true if newLvl == true then dxDrawRectangle(screenW * 0.4083, screenH * 0.9037, screenW * 0.1839, screenH * 0.0528, tocolor(0, 0, 0, 160), false) dxDrawImage(screenW * 0.4094, screenH * 0.9046, screenW * 0.0271, screenH * 0.0491, ":DayZ/tools/images/flags/join.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Congradulations! You have reached "..getElementData(getLocalPlayer(),"level").." Level!", screenW * 0.4385, screenH * 0.9046, screenW * 0.5901, screenH * 0.9537, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) setTimer(function() newLvl = false end,5000,1) end end addEvent( "onClientLevelUp", true ) addEventHandler( "onClientLevelUp", localPlayer, newLvl)
  15. Nope.. It stops woring without any errors/warnings. F*cked up Thanks!! It works great.
  16. Hello pros! I have resource with protect group base from others. It works well but time by time popups warning with make FPS drops. I hope you can help me! Warning: Code:
  17. Hello! I have error witch I don't know how to fix. I hope you can help me. Code: Error:
  18. Thank you very mutch! Can you help me with one more thing? How to fix this? I want make it look like - 5 hours 29 minutes 42 seconds not like this. code:
  19. Hello! Recently I made VIP panel witch works well. I wanted to add cooldown function but have no idea how to make it done. With cooldown I mean when you take VIP items you can't take them again for some time. That's my one of first scripts ever made. I hope you help me. Thanks! Code:
  20. Lachuks

    Anti-Spam

    Ok, I made it by my self... You can close this topic. -TC-
  21. Lachuks

    Anti-Spam

    Hello there! I have problem with spamming in GlobalChat and I don't know how to avoid it. I hope someone can help me. I want to - when someone start to spam he will get muted for 10 mins or just get kicked out of server. There is the code: globalchat = true function globalchatstate(playerSource) if getElementData(playerSource, "admin") == true or getElementData(playerSource, "sadmin") == true or getElementData(playerSource, "smanager") == true or getElementData(playerSource, "owner") == true then if globalchat == true then globalchat = false outputChatBox(getPlayerName(playerSource).." has deactivated the Global Chat!", getRootElement(), 255, 0, 0) elseif globalchat == false then globalchat = true outputChatBox(getPlayerName(playerSource).." has activated the Global Chat!", getRootElement(), 255, 0, 0) end end end addCommandHandler("globalstate", globalchatstate) function GlobalChat ( playerSource, commandname, ... ) if globalchat == true then local playerName = getPlayerName ( playerSource ) if(isPlayerMuted ( playerSource ) ~= true) then if(... ~= nil) then local arg = {...} local text = table.concat( arg, " " ) if ( getElementData( playerSource , "gang") == "randomgraestrt" ) then outputChatBox ( "[#ffffffGlobalChat#ffffff] -"..playerName..":#787878 "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "Admin" ) ) then outputChatBox ( "[#FF9219Server Owner#ffffff] - "..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "SuperMod" ) ) then outputChatBox ( "[#ED05DDSuper Moderator#ffffff] - "..playerName.." :#FFFFFF o "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "Supporter" ) ) then outputChatBox ( "[#0A5E9ASupporter#ffffff] - "..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "Moderator" ) ) then outputChatBox ( "[#06900DModerator#ffffff] - "..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "ServerManager" ) ) then outputChatBox ( ""..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "Administrator" ) ) then outputChatBox ( "[#C9B607Administrator#ffffff] - "..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "SuperAdministrator" ) ) then outputChatBox ( ""..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "VIP" ) ) then outputChatBox ( "[#2efe64VIP#ffffff] - "..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif ( getElementData( playerSource , "gang") == "Admins" ) then outputChatBox ( "#ffffff[GlobalChat] - "..playerName.." :#FFFFFF "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "VIP" ) ) then outputChatBox ( "[#2efe64VIP#ffffff] - "..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "Supporter" ) ) then outputChatBox ( "[#0A5E9ASupporter#ffffff] - "..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "Moderator" ) ) then outputChatBox ( "[#06900DModerator#ffffff] - "..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "SuperMod" ) ) then outputChatBox ( "[#ED05DDSuper Moderator#ffffff] - "..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("Administrator" ) ) then outputChatBox ( "[#C9B607Administrator#ffffff] - "..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("SuperAdministrator" ) ) then outputChatBox ( ""..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("ServerManager" ) ) then outputChatBox ( ""..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "Admin" ) ) then outputChatBox ( "[#9A0A0AServer Owner#ffffff] - "..playerName.."#FFFFFF]: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "CommunityFounder" ) ) then outputChatBox ( ""..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(playerSource)), aclGetGroup ( "CommunitySupporter" ) ) then outputChatBox ( ""..playerName.."#FFFFFF: "..text, getRootElement(), 255, 255, 255, true) else outputChatBox ( "#ffffff[GlobalChat] - "..playerName.."#FFFFFF: "..string.gsub(text, '#%x%x%x%x%x%x', ''), getRootElement(), 255, 255, 255, true) end else outputChatBox ( "Usage: /global <text>",playerSource,255,255,0) end else outputChatBox ( "You are muted, you cant write now!",playerSource,255,255,0) end else outputChatBox(playerName.." deactivateted the global chat!", playerSource, 255, 255, 0) end end addCommandHandler("GlobalChat",GlobalChat)
  22. can you put it in pzz I rly dont know ho to do it... I one time try and all script dont work
  23. How do to Markers and text should be above the player? And how do everything to open with the command... local screenX, screenY = guiGetScreenSize () local marker = createMarker ( 645.57184, 874.22052, -36, "arrow", 3, 0, 255, 0, 170 ) function leaderText() local xm,ym,zm = getElementPosition(marker) local x,y = getScreenFromWorldPosition(xm,ym,zm-3.5) local camX,camY,camZ = getCameraMatrix() if (x and y and getDistanceBetweenPoints3D(camX, camY, camZ, xm,ym,zm) <= 80) then dxDrawText ("Hello!", x,y,x,y, tocolor (0, 255, 0, 180) , ( screenX / 1000 ) * 1.8 , "default-bold" , "center" , "center" , false , true , false ) end end addEventHandler ("onClientPreRender", root,leaderText)
  24. Lachuks

    Help Pleas

    I want for marker be up player head and text under it... I make like duty script where you say aduty and you ahve godmode... its like say aduty and on head marker and text Admin OnDuty... (sorry for bad english)
×
×
  • Create New...