Jump to content

FIY9AL

Members
  • Posts

    32
  • Joined

  • Last visited

1 Follower

About FIY9AL

  • Birthday 05/01/2001

Recent Profile Visitors

885 profile views

FIY9AL's Achievements

Rat

Rat (9/54)

2

Reputation

  1. Downloading... i was waiting for MTA SA to change from 1.5 to 1.6 or 2.0... for so long time :)
  2. Great job, thanks to everyone who contributed to the development.
  3. addEventHandler("onClientKey", root, function(button) if (button == "F1") then cancelEvent() end end )
  4. You can customize the color, speed and location of each light The script works using two basic functions: engineApplyShaderToWorldTexture createMarker You can activate the lights on all cars The lights are visible to all players the same way you see them To request a police lights script, please contact me via: Discrod: FIY9AL#9743 Whatsapp: +1 707 999 7550 Preview: https://www.youtube.com/watch?v=CAo3riPfJw0
  5. Hello evreyone, i have simple GUI to edit vehicle wheels position, rotation, scale and thickness. evrey single adjustment you do to your wheels can be seen by evreyone in the server NOT ONLY TO YOU i will sell it encrybted for 10$ with full access to change some GUI features like text and color or buy full decrybted version to change wheels limits and GUI skins for 30$ contact me on discord: FIY9AL#0680 here is video example for script: Click Here the adjustment looks like this: local table_settings = { -- {position_limit, camber_limit, thickness_limit, size_limit, wheelID} {400, 4, 160, 1250, 1083}, -- {"bindkey_window"} {"F2"}, } local table_text = { -- WINDOW {"نافذة تحرير العجلات"}, --{"Vehicle Wheels Editor"}, -- RADIO BUTTON {"جميع العجلات", "العجلات الأمامية", "العجلات الخلفية"}, --{"All Wheels", "Front Wheels", "Rear Wheels"}, -- LABEL {"محاذاة العجلات عن المركبة: "}, --{"Wheel Offset From Vehicle: "}, {"مستوى انحناء العجلات: "}, --{"Wheel Negative Camber: "}, {"مستوى سماكة العجلات: "}, --{"Wheel Thickness: "}, {"حجم العجلات: "}, --{"Wheel Size: "}, }
  6. Great job, this resource make my maps better and better My gta looks like a modren game!
  7. this function will fade out your window till it disapperas then it will be fade in till it being fully visable you can edit it to be fade in/out when command triggerd or bindkey pressed fadeStatus = true function fading() local fadeRatioPerRender = 0.005 if (fadeStatus == true) then local alpha = guiGetAlpha(window_logo) guiSetAlpha(window_logo, alpha-fadeRatioPerRender) if (alpha == 0) then fadeStatus = false end else local alpha = guiGetAlpha(window_logo) guiSetAlpha(window_logo, alpha+fadeRatioPerRender) if (alpha == 1) then fadeStatus = true end end end addEventHandler("onClientRender", root, fading)
  8. السلام عليكم ورحمة الله وبركاتة انا اضفت مجموعة بيانات في قاعدة بيانات استضافة السيرفر MySQL ولكن عند استدعاء هذه البيانات تتحول على اشارت علامة تعجب هكذا ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ وهذا هو الكود المستخدم function mysql_getData() local result = dbPoll(dbQuery(mysql, "SELECT `Title_Name`, `Player_Name`, `URL`FROM `RADIO_SAVES` WHERE 1"), -1) if (result) then for i,n in ipairs(result) do local column_1 = n["Title_Name"] local column_2 = n["Player_Name"] local column_3 = n["URL"] outputChatBox(column_1, root, 255, 255, 0, true) outputChatBox(column_2, root, 255, 255, 0, true) outputChatBox(column_3, root, 255, 255, 0, true) end else outputChatBox("[MySQL] 'dbPoll' Error", root, 255, 0, 0, true) end end والبيانات باللغة العربية وتم وضع تنسيقها في قاعدة البيانات utf8_general_ci وتظهر في قاعدة البيانات باللغة العربية ولكن في اللعبة تظهر هكذا ايه افكار أو حلول ؟ ربما dbQuery لا يدعم عربي؟ أرجوا ايجاد لي حل
  9. Thank you its worked after i added it to admin acl and used your code
  10. Hello evreyone, i have this code and it should be outputChatBox on player join his country name but i tried to get it work but nothing show on chatbox here is the code: addEventHandler("onPlayerJoin", root, function() function displayPlayerCity(resp, errno, source) if errno == 0 then data = fromJSON("[".. resp .. "]") status = data["status"] or "fail" if status == "success" then if isElement(source) then outputChatBox(getPlayerName(source).." has joined the game ("..data["city"]..", "..data["country"]..")", root, 255, 100, 100) end else if isElement(source) then outputChatBox(getPlayerName(source).." has joined the game.", root, 255, 100, 100) end outputDebugString("JOINQUIT: Cannot retrieve network details") end else outputDebugString("JOINQUIT: Error @fetchRemote, ERRNO: "..errno) end end fetchRemote("http://ip-api.com/json/" .. getPlayerIP(source), displayPlayerCity, "", false, source) end ) Any idea ?
  11. I have created countdown functions based on this thread: and also this thread: my countdown function are useful and you can use it evreywhere Example 1: Here i make 'nil' values displayCountDown(nil, nil, 5, "%02s : %02s : %02s") to create a dx draw text like this: the first argument is to till hours, second is minutes, third is seconds, fourth is to create format and if you set some arguments to 'nil' it will be zeros Standard: displayCountDown(hh, mm, ss, format) Lets see more examples: Example 2: displayCountDown(24, 50, 30, "%02s : %02s : %02s") Example 3: displayCountDown(24, nil, 30, "%02s : %02s : %02s") Example 4: Here i have changed to format to [hh : mm] displayCountDown(24, nil, 30, "%02s : %02s") Example 5: Here i hve changed the format digits to [1] per item displayCountDown(1, 1, 9, "%01s : %01s : %01s") And this is the function code, you can export it or put it in your own code function displayCountDown(hh, mm, ss, format) local function convertSecondsToMinutes(ms) local hours = math.floor (ms/3600000) -- convert ms to hours local mins = math.floor (ms/60000) -- convert ms to mins local secs = math.floor ((ms/1000) % 60) -- convert ms to secs return string.format ( format, hours, ( mins - hours * 60 ), secs ) -- print hh:mm:ss format -- "%02s : %02s : %02s" is the default format end local function countdownFin() -- to do after countdown finished end direction = 0 if (hh ~= nil) then if (hh <= 23) and ((hh >= 0)) then hh = hh * 3600000 direction = direction + hh else outputChatBox("[ERROR] Hours must be between 0 and 24",255,0,0) direction = nil end end if (direction ~= nil) then if (mm ~= nil) then if (mm <= 59) and ((mm >= 0)) then mm = mm * 60000 direction = direction + mm else outputChatBox("[ERROR] Minutes must be between 0 and 60",255,0,0) direction = nil end end end if (direction ~= nil) then if (ss ~= nil) then if (ss <= 60) and ((ss >= 0)) then ss = ss * 1000 direction = direction + ss else outputChatBox("[ERROR] Seconds must be between 0 and 60",255,0,0) direction = nil end end end if (direction ~= nil) then countDownTimes = (direction / 1000) -- Convert direction into seconds to prevent debug warnings by setTimer function countdown = setTimer(countdownFin, direction+1000, 1) end local function drawText(text) local function drawTextZG() dxDrawText(text, 500, 500) -- dx draw on screen end addEventHandler ( "onClientPreRender", root, drawTextZG) -- draw evrey screen render setTimer( function() removeEventHandler ( "onClientPreRender", root, drawTextZG) -- remove text after each second end , 1000, 1) -- do this function evrey second once end if (direction ~= nil) then setTimer( function() drawText(convertSecondsToMinutes(getTimerDetails(countdown))) -- sends hh:mm:ss foramt to dx draw function end , 1000, countDownTimes-1) end end displayCountDown(23, 59, 60, "%02s : %02s : %02s") You can be creative with it you can use very diffrent formats like hh : mm : ss, hh, hh:mm, anything you can make it countdown any number you want you can upgrade it to be getting value from gui window you can change the draw text color, font,... to match your needs i hope this function helpful for evreyone i want to see your works done with this function Thank you for your time reading my thread.
  12. fixed some debug warnings and errors: function countdownFin() --whatever you want to happen here end timerDirection = 10000 -- 10 seconds countdown = setTimer(countdownFin, timerDirection, 1) countDownTimes = (timerDirection / 1000) -- Convert timerDirection into seconds to prevent debug warnings by setTimer function setTimer( function() if (isTimer(countdown) == true) then removeEventHandler ( "onClientRender", root, drawText) x = getTimerDetails(countdown) timeLeft = math.ceil(x/1000) function drawText() dxDrawText(convertSecondsToMinutes(timeLeft), 500, 500) end addEventHandler ( "onClientRender", root, drawText) else removeEventHandler ( "onClientRender", root, drawText) end end , 1000, countDownTimes) function convertSecondsToMinutes(sec) --turn the seconds into a MM:SS format local temp = sec/60 local temp2 = (math.floor(temp)) --this equals the minutes local temp3 = sec-(temp2*60) --and this is seconds if string.len(temp3) < 2 then --make sure it's displayed correctly (MM:SS) temp3 = "0"..tostring(temp3) end return tostring(temp2)..":"..tostring(temp3) end
  13. Thank you for providing this code i have upgraded it to be dx text rather than output chat box here is the code: function countdownFin() --whatever you want to happen here end local countdown = setTimer(countdownFin, 600000, 1) --set the timer for 10 minutes setTimer( function() removeEventHandler ( "onClientRender", root, drawText) local x = getTimerDetails(countdown) local timeLeft = math.ceil(x/1000) function drawText() dxDrawText(convertSecondsToMinutes(timeLeft), 500, 500) end addEventHandler ( "onClientRender", root, drawText) end , 1000, 0) function convertSecondsToMinutes(sec) --turn the seconds into a MM:SS format local temp = sec/60 local temp2 = (math.floor(temp)) --this equals the minutes local temp3 = sec-(temp2*60) --and this is seconds if string.len(temp3) < 2 then --make sure it's displayed correctly (MM:SS) temp3 = "0"..tostring(temp3) end return tostring(temp2)..":"..tostring(temp3) end
  14. Nice job upgrading my function i will use it, thank you for your time ?
×
×
  • Create New...