Jump to content

Simple.

Members
  • Posts

    1,004
  • Joined

  • Days Won

    1

Everything posted by Simple.

  1. getZoneName setWeather client side
  2. Simple.

    FUEL SYSTEM

    server/main.Lua factor = 0.03 local BlockedModel = { -- [Car id] = true, [411] = true, [457] = true, } function createVehicles(player) for i,v in ipairs(getElementsByType("vehicle")) do fuel = math.random(70,80) setElementData(v, "fuel", fuel) end end function processFuel(player) for i,v in ipairs(getElementsByType("vehicle")) do if not BlockedModel[getElementModel ( v )] then local fuel = getElementData(v, "fuel") or math.random(70,80) if (getVehicleEngineState(v) and fuel > 0 ) then fuel = fuel - factor end if (fuel <= 0.99) then fuel = 0 setVehicleEngineState(v, false) end setElementData(v, "fuel", fuel) end end end createVehicles() setTimer(processFuel, 1000, 0)
  3. Simple.

    FUEL SYSTEM

    local BlockedModel = { -- [Car id] = true, [411] = true, [457] = true, } if not BlockedModel[getElementModel ( v )] then -- Bla Bla Bla end
  4. Check this script There is an example nightly.multitheftauto.com/files/shaders/shader_hud_mask.zip
  5. local account = getPlayerAccount ( player ) if account and not isGuestAccount ( player ) then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup('Acl name here')) then -- your code here end end
  6. local objectid = items['medkit'].desc
  7. You can do it in two ways items['medkit'] = {desc = 'A healing item', name = 'Medic Kit', objectid = '431'} or table.insert(items, 'medkit', {desc = 'A healing item', name = 'Medic Kit', objectid = '431'})
  8. السلام عليكم سكربتات قديمه سويتها و ما احتاجها لحرب العصابات - مخدرات -يوزر بانل -البيوت -التحديات -المسابقات -سكن شادر هذا الرابط للتحميل وللفائده https://cdn.discordapp.com/attachments/677248166353174528/687011513609093165/0xSimplex0.rar ?
  9. https://community.multitheftauto.com/?p=resources&s=details&id=13072
  10. استخدم setSoundVolume --setSoundVolume( source, 1 ) مع سكربت الـ Voice
  11. جميل جداً والي اعجبني فيه بزياده حركة البيد لكن لو يكون البيد ياخذ الفلوس ويمشي يحطها بالخزنه تطلع اطلق بالتوفيق ?
  12. local screenWidth, screenHeight = guiGetScreenSize ( ) local scroll = guiCreateScrollBar(15,81,24,245,false,false) local scroll2 = guiCreateScrollBar(45,81,24,245,false,false) local scroll3 = guiCreateScrollBar(75,81,24,245,false,false) local R, G, B = 0, 0, 0 addEventHandler( "onClientGUIScroll", root, function() local ScrollValue = guiScrollBarGetScrollPosition ( source ) if source == scroll then R = (255/100) * ScrollValue elseif source == scroll2 then G = (255/100) * ScrollValue elseif source == scroll3 then B = (255/100) * ScrollValue end end) function createText ( ) local playerX, playerY, playerZ = getElementPosition ( localPlayer ) -- Get our player's coordinates. local playerZoneName = getZoneName ( playerX, playerY, playerZ ) -- Get name of the zone the player is in. -- Draw zone name text's shadow. dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) -- Draw zone name text. dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( R, G, B, 255 ), 1, "pricedown" ) end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) @+Source|>
  13. وش تبي تسوي بالضبط؟
  14. Simple.

    سؤال

    getVehicleComponentPosition الارقمنت الثالث خله world راح يجيب لك الاحداثيات في العالم واستخدم getDistanceBetweenPoints3D عشان تجيب اقرب كفر لك
  15. local LevelData = "Level" local ExpData = "Exp" function giveXP ( player, exp ) if isElement ( player ) and getElementType ( player ) == 'player' then if exp and type ( exp ) == "number" then local level = getElementData ( player, LevelData ) or 1 local currentXp = getElementData ( player, ExpData ) or 0 if currentXp + exp > level * 100 then setElementData ( player, LevelData, level + 1 ) setElementData ( player, ExpData, ( currentXp + exp ) - ( level * 100 ) ) outputChatBox ( 'Level up to '..level+1, player) else setElementData ( player, ExpData, currentXp + exp ) outputChatBox ( 'Exp up to '..currentXp + exp, player) end end end end هذا نظام لفلات بسيط ماجربته بس إن شاء الله مضبوط يبقى عليك حفظ اللفل والاكس بي ولما يقتل تعطيه اكس بي عدله بالي يناسبك
  16. مسوي لكل لفل تحقق ؟ ?
  17. Simple.

    سؤال

    local showComponents = false bindKey("f5", "down", function() showComponents = not showComponents end) addEventHandler("onClientRender", root, function() if (showComponents) then for _, veh in pairs(getElementsByType("vehicle", root, true)) do for compname in pairs(veh:getComponents()) do local x, y = getScreenFromWorldPosition(veh:getComponentPosition(compname, "world")) if (x) then dxDrawText(compname, x, y, 0, 0, tocolor(255, 255, 255)) end end end end end ) هذا مثال من الويكي ممكن يساعدك
  18. لما ياخذ اكس بي سو تحقق إذا الاكس بي مع الزيادة اكثر من الحد زود للاعب لفل واخصم من الاكس بي الحد حق اللفل وعطه الاكس بي الباقي ? مثال EXP = givenXP + currentXP if EXP > limitXP then level = level + 1 currentEXP = EXP - limitXP limitXP = level * 100 end مجرد مثال عن الطريقة الي بتسويها
  19. addEventHandler("onVehicleEnter", root, function (player, _, jacked) if isElement(jacked) and getElementType(player) == "player" and getElementType(jacked) == "player" and (getTeamName(getPlayerTeam(player)) ~= 'Police') then setElementData(player, "Charges", tonumber(getElementData(player, "Charges"))+30) end end)
  20. Simple.

    سؤال

    math.random setTimer
  21. local screenW, screenH = guiGetScreenSize() clanwarwnd = guiCreateWindow((screenW - 800) / 5, (screenH - 800) / 5, 800, 800, "Clanwar Panel", false) guiWindowSetMovable(clanwarwnd, false) guiWindowSetSizable(clanwarwnd, false) guiSetVisible(clanwarwnd, false) cjoin = guiCreateButton(49, 35, 169, 37, "Enable Command 'cjoin'", false, clanwarwnd) stgm = guiCreateButton(233, 35, 169, 37, "Start Game + Open Doors", false, clanwarwnd) edgm = guiCreateButton(49, 87, 169, 37, "End Game + Close Doors", false, clanwarwnd) rfwn = guiCreateButton(233, 87, 169, 37, "Rifa Win + Top Players", false, clanwarwnd) mfwn = guiCreateButton(49, 138, 169, 37, "Mafia Win + Top Players", false, clanwarwnd) adjoin = guiCreateButton(233, 138, 169, 37, "Admins Join Only", false, clanwarwnd) slapall = guiCreateButton(49, 185, 169, 37, "Slap All Players", false, clanwarwnd) closewnd = guiCreateButton(233, 185, 169, 37, "Close Window", false, clanwarwnd) Points_EditBox = guiCreateEdit(49, 185, 169, 37, "", false, clanwarwnd) Points_Label = guiCreateLabel(0.46, 0.65, 0.08, 0.03, "Points :", true, clanwarwnd) guiSetFont(Points_Label, "default-bold-small") guiLabelSetHorizontalAlign(Points_Label, "center", false)
×
×
  • Create New...