Jump to content

FIY9AL

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by FIY9AL

  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 ?
  15. Server Side: function eyeBlink(fadeoutTime, waitTime, fadeinTime, player) -- fading time must be in seconds, waiting time must be in milliseconds. fadeCamera(player, false, fadeoutTime, 0, 0, 0) function fadeIn() fadeCamera(player, true, fadeinTime, 0, 0, 0) end setTimer(fadeIn, waitTime, 1) end To use it just write: eyeBlink(0.5, 500, 0.5, player) Have a nice day .
  16. اول شي اشكرك صراحة على الفنكشن الاكثر من بطل بصراحة كنت اعاني بكثرة بسالفه الانتربوليت وانت حليتها بسطر واحد فقط مع ذلك فيه كثير من الاعضاء يواجهون مشاكل في استخدامه لذلك سويت مثال بسيط ليسهل التعديل عليها "table" داخل لستة "parameters" وقمت بوضع جميع الفراغات المطلوبة Client side only: -- Test Window Function function client_window() -- Get player screen size local screenW, screenH = guiGetScreenSize() -- Create new window window = guiCreateWindow(10, (screenH - 466) / 2, 450, 466, "Press \"F2\" to close/show.", false) -- Setting window invisable when its created. guiSetVisible(window, false) end addEventHandler("onClientResourceStart", resourceRoot, client_window) -- Bindkey "F2" Function function client_bindF2() local screenW, screenH = guiGetScreenSize() effect_table = { {-100, (screenH -100) /2}, -- Animation X Position (start), Animation Y Position (start) {100, 100}, -- Animation Window Width (start), Animation Window Height (start) {10, (screenH - 466) / 2}, -- Window X Position (end), Window Y Position (end) {450, 466}, -- Window Width (end), Window Height (end) {1, "InOutElastic", "InOutElastic", true}, -- [Open] Time (seconds), Position (easing), Size (easing), Visable (bool) {1, "InOutElastic", "InOutElastic", false}, -- [Close] Time (seconds), Position (easing), Size (easing), Visable (bool) } --exports.gie:guiAddInterpolateEffect(Window, --startX, startY, --startW, startH, --endX, endY, --endW, endH, --time, positionEasing, sizeEasing, bool showing) if (guiGetVisible(window) == false) then exports.gie:guiAddInterpolateEffect(window, effect_table[1][1], effect_table[1][2], effect_table[2][1], effect_table[2][2], effect_table[3][1], effect_table[3][2], effect_table[4][1], effect_table[4][2], effect_table[5][1], effect_table[5][2], effect_table[5][3], effect_table[5][4]) showCursor(true) else exports.gie:guiAddInterpolateEffect(window, effect_table[3][1], effect_table[3][2], effect_table[4][1], effect_table[4][2], effect_table[1][1], effect_table[1][2], effect_table[2][1], effect_table[2][2], effect_table[6][1], effect_table[6][2], effect_table[6][3], effect_table[6][4]) showCursor(false) end end bindKey("F2", "down", client_bindF2) وهذا مثال يوضح شكل النافذة بعد وضع الكود اعلاه داخل السكربت Preview: https://www.youtube.com/embed/DJ9XBLm7DUU <iframe width="560" height="315" src="https://www.youtube.com/embed/DJ9XBLm7DUU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  17. اتمنى تشكره على صنع الكود
  18. انا مستعد افهمك كل شي تبغا تسويه في اللوحات من انشاء اوامر للازرار الى جعل النافذة تفتح برتبة او قروب معين الى كتابة كلام بالشات عند امر معين وتصميم النوافذ من الف الى الياء بدون مقابل مادي تواصل معي واتساب +966570570363
  19. Thank you very much "SaNoR" i'm really appreciate you. it is working perfectly as it is should.
  20. After searching into "geoip" script functions i found that it will work only for Russain players "geoip" server side getCountryCity function: function getCountryCity( ip ) local num = tostring( toIPNum( ip ) ) local qh = dbQuery( sqlite_geo_db, "SELECT city,region FROM geoIPCityLocation_RU WHERE locId = (SELECT locId FROM geoIPCityBlocks_RU WHERE ".. num .." BETWEEN begin_num AND end_num LIMIT 1) LIMIT 1" ) local res = dbPoll( qh, -1 ) if res[ 1 ] then return res[ 1 ].city, res[ 1 ].region, "RU", "Russian Federation" end return false end can someone found simillar script works for worldwide or saudi arabia ? I Have found website can return IP City as table called http://ip-api.com/json/ it will be great if someone used https://wiki.multitheftauto.com/wiki/fetchRemote function to link the website table with variable and use it into script
  21. I have downloaded "geoip" resource, installed it in my server and started it, created script called "ip" with Client side: function showCity( ) local thePlayer = getLocalPlayer ( ) local playerName = getPlayerName( thePlayer ) local country, countryFull = exports.geoip:getCountry( getPlayerIP( thePlayer ) ) local city = exports.geoip:getCountryCity( getPlayerIP( thePlayer ) ) if country == "SA" then outputChatBox( "[INFO]".. playerName .."His Country is:".. countryFull .."and City is:".. city, root, 255, 0, 0, true) else outputChatBox( "[INFO]".. playerName .."His Country is:".. countryFull, root, 255, 0, 0, true) end end addEventHandler ( "onClientResourceStart", getRootElement(), showCity ) meta file: <meta> <info author="FIY9AL" name="Show Players City" type="script" version="1.0" /> <script src="Client.Lua" type="client"/> </meta> and it didn't work, nothing output into chatbox, any help or idea ?
  22. Please provied the codes that you have made and explain your idea more and make it clear to help you .
  23. can explain more please ? i didn't understand what is idle animation, but you better see anim function in wiki: setPedAnimation bool setPedAnimation ( ped thePed [, string block = nil, string anim = nil, int time = -1, bool loop = true, bool updatePosition = true, bool interruptable = true, bool freezeLastFrame = true, int blendTime = 250, bool retainPedState = false ] ) there is [time, loop, blendTime and retainPedState] arguments it may be helpful in your case. Optional Arguments NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments. block: the animation block's name. anim: the name of the animation within the block. time: how long the animation will run for in milliseconds. loop: indicates whether or not the animation will loop. updatePosition: will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations. interruptable: if set to false other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated. freezeLastFrame: if set to true after animation the last frame will be frozen, otherwise the animation will end and controls will return. blendTime: how long the animation will mixed with the previous one in milliseconds. retainPedState: will restore the task which was playing before calling this function. Useful for restoring the crouch task after animation ends. This may be extended in the future to support other states/tasks.
×
×
  • Create New...