Jump to content

MrKAREEM

Members
  • Posts

    621
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by MrKAREEM

  1. OnClientClick IsMouseInPosition for the color here's an example local r = 255 local b = 0 local g = 0 addEventHandler("onClientRender", root, function() dxDrawLine3D ( 0, 0, 0, 0, 0, 0, tocolor ( r, b, g, alpha )) end) addCommandHandler('green', function() r = 0 b = 255 g = 0 end)
  2. MrKAREEM

    low fps in game

    I bought a laptop recently and I'm facing a problem with the game, the problem is the low fps The fps rate is between 10 to 24 and it may be less. This problem causes me problems and I feel that I do not play the game at all. I do not know if the problem is due to the capabilities of the laptop or Windows because I searched for about two months and did not find a solution. Laptop Capabilities: hp laptop 15-ra0xx processor : intel(R) Celeron(R) CPU N3060 @ 1.60GHz 1.60 GHz Ram : 4gb 64×bit windows : wnidows 10 pro
  3. مش شايف اخطاء بس جرب تخلي الايفينت للروت واتاكد ان فيه حد بيدمجك او انك وقعت من فوق سيكل وانت بتجرب السكربت لانك حاطط تحقق علي الاتاكر
  4. .ايه علاقة التايمر بالداتا بالموضوع لو تعرض محاولتك يكون أسهل
  5. in the lines 8 and 9 change getLocalPlayer() with getElementsByType('player')
  6. SetPlayerWantedLevel OnPlayerWasted
  7. sim você pode fazer isso usando: FileOpen : file fileOpen ( string filePath [, bool readOnly = false ]) filePath : ": resourceName / path". 'resourceName' é o nome do recurso em que o arquivo está e 'path' é o caminho do diretório raiz do recurso para o arquivo. Por exemplo, se houver um arquivo chamado 'coolObjects.txt' no recurso 'objectSearch', ele poderá ser aberto a partir de outro recurso da seguinte maneira: fileOpen (": objectSearch / coolObjects.txt"). Se o arquivo estiver no recurso atual, apenas o caminho do arquivo será necessário, por exemplo fileOpen ("coolObjects.txt"). FileRead FileWrite FileClose
  8. حمل سكربت وشوف بيشتغل ازاي واتعلم منه لان صعب واحد يشرحلك سكربت طويل زي دا
  9. AddCommandHandler IsElement GetElementPosition SetElementPosition وتحتاج تستخدم OnClientRender RemoveEventHandler او SetTimer IsTimer KillTimer من اجل التحقق المستمر ان كان موجود الابجيكت وتغير مكانه بوقت مستمر الي أن تقوم بالغاء التحرك
  10. buen trabajo hermano, has hecho un buen trabajo, pasa un buen rato ?
  11. addCommandHandler("lchat", function(player,cmd,...) local msg = table.concat( {...}, " " ) if msg then local x,y,z = getElementPosition(player) local name = getPlayerName(player) for k,v in ipairs(getElementsByType("player")) do local pos = Vector3(getElementPosition(v)) if getDistanceBetweenPoints3D ( x, y, z, pos.x, pos.y, pos.z ) < 20 then outputChatBox( "* "..name..": "..msg, v, 200, 250, 200, true ) end end end end ) addEventHandler("onPlayerJoin", root, function() bindKey(source, "U", "down", "chatbox", "lchat") end ) es mas facil es más fácil a menos que cree formas de colls
  12. ¿Por qué creas coll? puedes recorrer todos los jugadores y usar GetDistanceBetweenPoints3D + al crear un objeto o una coll en el servidor de esa manera, debe usar la tabla porque si otro jugador envía un mensaje, la coll será destruida por él o causará algunos errores
  13. ممكن العيب في المجسم نفسه أحيانا المشكلة دي بتحصل حاول تشيله من الاتاك وتخليه في قائمة CHASSIS
  14. server : local chat = 'Local' local command = 'chat' addCommandHandler(command, function(player,_,...) if not player then return end if isPlayerMuted ( player ) then return outputChatBox('you are muted!',player,255,255,0) end local arg = {...} local count = #arg if count < 1 then return outputChatBox('the messeage must be 1 line at least!',player,255,0,0) end local string = table.concat( arg, " " ) local r,b,g = getPlayerNametagColor(player) if r and b and g then outputChatBox ( '('..chat..'): '..string.format("#%.2X%.2X%.2X", r, g, b)..''..string.gsub(getPlayerName(player),'#x%x%x%x%x%x%','')..'#FFFFFF : '..string, root, 255,255,255, true ) else outputChatBox ( '('..chat..'): '..string.gsub(getPlayerName(player),'#x%x%x%x%x%x%','')..' : '..string, root, 255,255,255, true ) end end)
  15. LocalChat Vea este recurso y vea cómo funciona
  16. DxDrawProgressBar veja esta função útil e verifique os códigos de operação como funciona
  17. you can create your custom chat with : AddCommandHandler GetPlayerName OutputChatBox make the script in server and the message will appear to all players
  18. + OnClientPlayerWasted (client) أو OnPlayerWasted (server)
  19. você pode usar a renderização do cliente e verificar se o mouse está na posição, para mudar de cor, aqui está um exemplo local sX, sY = guiGetScreenSize() local r, b, g, alpha = 0, 0, 0, 0 local visible = false local state function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end function draw() if visible = true then dxDrawRectangle(sX * 0.0154, sY * 0.3008, sX * 0.2284, sY * 0.3242, tocolor(r, b, g, alpha)) if isMouseInPosition(sX * 0.0154, sY * 0.3008, sX * 0.2284, sY * 0.3242) then r,b,g = 255,0,0 else r,b,g = 0,0,0 end end end function fadeIN_FadeOut() if state == 'increase' then if alpha < 1 then alpha = alpha + 5 end if alpha > 254 then removeEventHandler('onClientRender',fadeIN_FadeOut) end elseif state == 'decrease' then if alpha > 254 then alpha = alpha - 5 end if alpha < 1 then removeEventHandler('onClientRender',fadeIN_FadeOut) end end end bindKey('F2','down', function() if visible == false then visible = true addEventHandler("onClientRender", root, draw) addEventHandler("onClientRender", root, fadeIN_FadeOut) state = 'increase' else visible = false removeEventHandler("onClientRender", root, draw) addEventHandler("onClientRender", root, fadeIN_FadeOut) state == 'decrease' end end)
  20. math.ceil (x) Returns the smallest integer larger than or equal to x. math.floor (x) Returns the largest integer smaller than or equal to x. both of them are better use what you need ?
  21. GetAccountData SetAccountData OnPlayerLogin GivePlayerMoney
  22. math.floor will returns a less value if the speed 100 it will display 99 ?
×
×
  • Create New...