Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/18 in all areas

  1. السلام عليكم ورحمة الله وبركاتة استضافة لايف هوست ,, لخدمات الخوادم وقريبا سيرفرات الالعاب. .جميع الخوادم و السيرفرات يوجد بها حماية ضد هجمات الدوس لحماية سيرفرات الألعاب خدماتنا خوادم الويندوز خوادم الينكس - طرق الدفع المتوفرة Payment methods: طرق الدفع للخوادم و سيرفرات الالعاب 1 - PayPal | باي بال 2 - Sawa| كروت شحن سوأ 3 - EG Vodafone | كروت شحن فودافون المصرية 3 - Bank transfer | متوفر لدينا بنوك مصريه وسعوديه وغيرهما. 4 - Gift cards | كروت شحن امازون, غيرها ( لانقبل دائمآ ) فقط طرق التواصل فتح تذكرة دعم بالموقع الشات المباشر بالموقع مراسلتنا عبر الايميل [email protected] للشراء عبر البطاقات يجب فتح تذكرة دعم فني في موقعنا بمنطقة العميل *
    1 point
  2. You contact me in order to buy, the payment is made by paypal. The price depends on the stuff you want, and you will have support after the purchase.
    1 point
  3. addEventHandler("onMarkerHit",ptMarker, function(hitElement,matchingDimension) if (hitElement and getElementType(hitElement) == "player" and not isPedInVehicle(hitElement)) then local lvl = getElementData ( hitElement, "player:level" ) or 0 if lvl >= 5 then if not (getElementData(hitElement,"AGJob") == "postman") then -- we use this to check if the player did not take the job before triggerClientEvent("showGui", hitElement, hitElement) else outputChatBox("Садитесь в машину и везети посылки по адресу!", hitElement,100,100,100) end else outputChatBox ("Требуется уровень 5 или выше. У вас "..lvl.." увроень", hitElement) end end end)
    1 point
  4. يتحقق من سيريال اللاعب اذا دخل السيرفر اذا كان موجود سيرياله في قاعدة البيانات او لا
    1 point
  5. 1 point
  6. 1 point
  7. Groups = { -- القروبات المسموح لها بالكتابة "Console", "AM", } -------------------- لا داعي لتعديل الأكواد تحت هذا السطر ------------------- function check ( thePlayer, commandName, ... ) if getElementData(resourceRoot,"oskar_") == 'false' then return outputChatBox('العاجل مغلق مؤقت',thePlayer,255,0,0,true) end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) local veve = { ... } local message = table.concat ( veve, " " ) for i, v in ipairs ( Groups ) do if isObjectInACLGroup ( "user."..accName, aclGetGroup ( v ) ) then setElementData ( resourceRoot, "MessageAdmin", message); setElementData(resourceRoot,"PlrAdmin",getPlayerName(thePlayer)); SaveMessage ( ) triggerClientEvent ( "Bingo", getRootElement( ), getElementData ( resourceRoot, "MessageAdmin" ) ) end end end addCommandHandler( "AM", check ) addCommandHandler("MM",function (thePlayer,command,source) if source == 'false' then setElementData(resourceRoot,'oskar_','false') outputChatBox('تم قفل العاجل',thePlayer,255, 0, 0,true) elseif source == 'true' then setElementData(resourceRoot,'oskar_','true') outputChatBox('تم فتح العاجل',thePlayer,0, 255 , 0,true) end end) addEventHandler ( "onResourceStart", resourceRoot, function ( ) executeSQLQuery("CREATE TABLE IF NOT EXISTS SaveMessagee (Message, Server)") end ) addEvent ( "SetMessage", true ) addEventHandler ( "SetMessage", root, function ( ) getMessage ( ) end ) SaveMessage = function ( ) local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee WHERE Server = '" .. getServerName ( ) .."'" ) if ( #msg ~= 0 ) then return executeSQLQuery("UPDATE SaveMessagee SET Message=? WHERE Server=? ", tostring ( getElementData ( resourceRoot, "MessageAdmin" ) ), getServerName ( ) ) else return executeSQLQuery("INSERT INTO SaveMessagee (Message,Server) VALUES(?,?)", tostring ( getElementData ( resourceRoot, "MessageAdmin" ) ), getServerName ( ) ) end end getMessage = function ( ) local msg = executeSQLQuery ( "SELECT * FROM SaveMessagee" ) if ( #msg ~= 0 ) then setElementData ( resourceRoot, "MessageAdmin", msg[1]["Message"] ) return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement( ), getElementData ( resourceRoot, "MessageAdmin" ) ) else return setTimer ( triggerClientEvent, 1000, 1, "Bingo", getRootElement( ), " " ) end end اكتب ب اف 8 MM true >> مفتوح MM false >> مقفول
    1 point
  8. Try this: -- Some stats local isPumping = false local fuelPrice = 5 local currentMarker local doEventHandlers local disabledVehs = { [510] = true, [509] = true, [481] = true } -- When the player enters a vehicle addEventHandler ( "onClientVehicleEnter", root, function ( thePlayer, seat ) if ( thePlayer == localPlayer ) and ( seat == 0 ) and disabledVehs[getElementModel(source)] ~= true then if ( fuelTimer ) and ( isTimer( fuelTimer ) ) then killTimer( fuelTimer ) end if not ( getElementData ( source, "vehicleFuel" ) ) then setElementData ( source, "vehicleFuel", 100 ) elseif ( getElementData ( source, "vehicleFuel" ) <= 0 ) then disableVehicleFunctions( source ) else enableVehicleFunctions( source ) end if ( doEventHandlers ) then addEventHandler ( "onClientVehicleExit", source, onVehicleExitDestroy, false ) addEventHandler ( "onClientElementDestroy", source, onVehicleExitDestroy, false ) doEventHandlers = false end fuelTimer = setTimer ( onDecreaseFuel, 7000, 0 ) end end ) -- Disable all vehicle functions whenever the vehicle has no fuel left function disableVehicleFunctions ( theVehicle ) if ( fuelTimer ) and ( isTimer( fuelTimer ) ) then killTimer( fuelTimer ) end setVehicleEngineState( theVehicle, false ) toggleControl ( "accelerate", false ) toggleControl ( "brake_reverse", false ) outputChatBox( "This vehicle has stopped fuel, call a mechanic to refuel!", 0, 225, 0 ) end -- Enable the vehicle functions again function enableVehicleFunctions( theVehicle ) setVehicleEngineState( theVehicle, true ) toggleControl ( "accelerate", true ) toggleControl ( "brake_reverse", true ) end -- When the resource starts addEventHandler ( "onClientResourceStart", resourceRoot, function () local vehicle = getPedOccupiedVehicle ( localPlayer ) if ( vehicle ) and ( getVehicleOccupant ( vehicle, 0 ) == localPlayer ) and disabledVehs[getElementModel(vehicle)] ~= true then doEventHandlers = true if not ( getElementData ( vehicle, "vehicleFuel" ) ) then setElementData ( vehicle, "vehicleFuel", 100 ) elseif ( getElementData ( vehicle, "vehicleFuel" ) <= 0 ) then disableVehicleFunctions( vehicle ) end if ( doEventHandlers ) then addEventHandler ( "onClientVehicleExit", root, onVehicleExitDestroy, false ) addEventHandler ( "onClientElementDestroy", root, onVehicleExitDestroy, false ) doEventHandlers = false end fuelTimer = setTimer ( onDecreaseFuel, 5000, 0 ) end end ) -- Function when a vehicle gets destroyed or when a player exit the vehicle function onVehicleExitDestroy ( theVehicle ) local theVehicle = theVehicle or source if ( fuelTimer ) and ( isTimer( fuelTimer ) ) then killTimer( fuelTimer ) end if ( getElementData ( theVehicle, "vehicleFuel" ) ) then setElementData ( theVehicle, "vehicleFuel", getElementData ( theVehicle, "vehicleFuel" ) ) end unbindKey ( "K", "down", onRefuelVehicle ) unbindKey ( "K", "up", onStopRefuelVehicle ) isPumping = false if ( theVehicle ) then removeEventHandler ( "onClientVehicleExit", theVehicle, onVehicleExitDestroy, false ) removeEventHandler ( "onClientElementDestroy", theVehicle, onVehicleExitDestroy, false ) doEventHandlers = true end end -- When the resource gets stopped addEventHandler ( "onClientResourceStop", resourceRoot, function () local vehicle = getPedOccupiedVehicle ( localPlayer ) if ( vehicle ) and ( getVehicleOccupant ( vehicle, 0 ) == localPlayer ) and disabledVehs[getElementModel(vehicle)] ~= true then onVehicleExitDestroy ( vehicle ) end end ) -- Function that decreases the fuel function onDecreaseFuel () local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( theVehicle ) then local theFuel = getElementData ( theVehicle, "vehicleFuel" ) if ( theFuel ) and not ( isPumping ) and ( getVehicleEngineState ( theVehicle ) ) and ( theFuel > 0 ) and ( getVehicleOccupant ( getPedOccupiedVehicle ( localPlayer ), 0 ) == localPlayer ) then setElementData ( theVehicle, "vehicleFuel", theFuel - 1 ) if ( getElementData ( theVehicle, "vehicleFuel" ) <= 0 ) then disableVehicleFunctions( theVehicle ) end end end end -- Get the vehicle speed function getVehicleSpeed ( theVehicle, unit ) if ( unit == nil ) then unit = 0 end if ( isElement( theVehicle ) ) then local x,y,z = getElementVelocity( theVehicle ) if ( unit=="mph" or unit==1 or unit =='1' ) then return ( x^2 + y^2 + z^2 ) ^ 0.5 * 100 else return ( x^2 + y^2 + z^2 ) ^ 0.5 * 1.61 * 100 end else return false end end -- When the player hits a fuel marker function onFuelPumpMarkerHit ( hitElement, matchingDimension, theMarker ) if hitElement == localPlayer and isPedInVehicle(localPlayer) then local veh = getPedOccupiedVehicle( localPlayer ) if veh and disabledVehs[getElementModel(veh)] then return end end local theMarker = theMarker or source if ( hitElement ) and ( getElementType ( hitElement ) == "player" ) and ( matchingDimension ) and ( getPedOccupiedVehicle( hitElement ) ) and ( isFuelMarker ( theMarker ) ) and ( getVehicleController( getPedOccupiedVehicle( hitElement ) ) == localPlayer ) then local theVehicle = getPedOccupiedVehicle( hitElement ) if ( getElementData( theVehicle, "vehicleFuel" ) >= 100 ) then outputChatBox ( "Your vehicle has enough fuel!", 225, 0, 0 ) else currentMarker = theMarker bindKey ( "K", "down", onRefuelVehicle ) outputChatBox ( "Press 'K' if you want to refuel.", 0, 255, 0 ) end end end -- When the player hits a fuel marker function onFuelPumpMarkerLeave ( hitElement, matchingDimension ) if hitElement == localPlayer and isPedInVehicle(localPlayer) then local veh = getPedOccupiedVehicle( localPlayer ) if veh and disabledVehs[getElementModel(veh)] then return end end if ( hitElement == localPlayer ) and theVehicle and not isPedInVehicle(localPlayer) then unbindKey ( "K", "down", onRefuelVehicle ) unbindKey ( "K", "up", onStopRefuelVehicle ) isPumping = false end end -- When the player press the space button to refuell function onRefuelVehicle () local veh = getPedOccupiedVehicle( localPlayer ) if ( veh ) and disabledVehs[getElementModel(veh)] ~= true then local theVehicle = getPedOccupiedVehicle( localPlayer ) setElementFrozen ( theVehicle, true ) if ( getVehicleSpeed ( theVehicle, "kmh" ) >= 1 ) then outputChatBox ( "Please bring the vehicle to a complete stop!", 225, 0, 0 ) elseif ( getPlayerMoney() < fuelPrice ) then outputChatBox ( "You do not have enough money, the price is $" .. fuelPrice .." per litre!", 255, 0, 0 ) else local oldFuel = math.floor( getElementData ( theVehicle, "vehicleFuel" ) ) setTimer ( onRefillVehicle, 250, 1, theVehicle, oldFuel ) outputChatBox ( "Your vehicle is being filled, please wait...", 0, 255, 0 ) isPumping = true unbindKey ( "K", "down", onRefuelVehicle ) bindKey ( "K", "up", onStopRefuelVehicle ) end else onStopRefuelVehicle () end end -- Actualy refill the vehicle function onRefillVehicle( theVehicle, oldFuel, price ) if ( theVehicle ) and ( oldFuel ) then local theFuel = tonumber( oldFuel ) local thePrice = tonumber( price ) or 0 if not ( getKeyState ( "K" ) ) then onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) elseif ( getPlayerMoney() < fuelPrice ) and not ( getElementData( theVehicle, "vehicleOccupation" ) ) then outputChatBox ( "You do not have enough money to continue, the price is $" .. fuelPrice .." per litre!", 255, 0, 0 ) onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) elseif ( oldFuel >= 100 ) then onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) else theFuel = math.floor( theFuel + 1 ) thePrice = math.floor( thePrice + 5 ) setTimer ( onRefillVehicle, 250, 1, theVehicle, theFuel, thePrice ) setElementData ( theVehicle, "vehicleFuel", theFuel ) end end end -- When the player stops pressing space or stop fuel function onStopRefuelVehicle ( theFuel, thePrice, theVehicle ) unbindKey ( "K", "up", onStopRefuelVehicle ) isPumping = false local theVehicle = getPedOccupiedVehicle( localPlayer ) local newFreezeStatus = not currentFreezeStatus setElementFrozen ( theVehicle, false ) if ( theFuel ) and ( thePrice ) and not ( tostring( theFuel ) == "space" ) then if ( tonumber( theFuel ) < 100 ) then bindKey ( "K", "down", onRefuelVehicle ) outputChatBox ( "Press 'K' if you want to refuel more.", 225, 0, 0 ) end if ( theVehicle ) and ( getElementData( theVehicle, "vehicleOccupation" ) ) then outputChatBox ( "The company, he works for pays its fuel, lucky bastard.", 0, 255, 0 ) else triggerServerEvent ( "onPlayerPaymentFuel", localPlayer, thePrice ) if ( thePrice ) then outputChatBox ( "You paid $" .. thePrice .. " for recharging!", 0, 255, 0 ) end end end end
    1 point
  9. ملف السيرفر local Groups = { "Console", "AM" } local Serials = { ["سريالك1"] = true, ["سريالك2"] = true } function isPlayerAdmin(player) for k,v in ipairs ( Groups ) do if aclGetGroup(v) then if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then return true end end end end addEventHandler("onResourceStart", resourceRoot, function() for _,player in ipairs(getElementsByType("player")) do if isPlayerAdmin(player) then bindKey(player, "u", "down", "chatbox", "IM") end end end ) addCommandHandler("IM", function(player,_,...) local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"} if not isGuestAccount(getPlayerAccount(player)) then if isPlayerAdmin(player) then if data[2] ~= "closed" then local message = table.concat({...}, " ") setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, message, "opened"}) else outputChatBox("العاجل مغلق", player, 255, 0, 0, true) end end end end ) addCommandHandler("قفل", function(player) if Serials[getPlayerSerial(player)] then local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "opened"} if data[3] ~= "closed" then setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "closed"}) outputChatBox("تم اغلاق العاجل", player, 255, 0, 0, true) else setElementData(getResourceRootElement(getThisResource()), "AdminMessage", {true, data[2], "opened"}) outputChatBox("تم فتح العاجل", player, 0, 255, 0, true) end end end ) ملف الكلينت #@ function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 ) local wh = 1 local msg_gsub = text:gsub ( '#%x%x%x%x%x%x', '' ) dxDrawText ( msg_gsub, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( msg_gsub, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( msg_gsub, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( msg_gsub, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( msg_gsub, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( msg_gsub, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( msg_gsub, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( msg_gsub, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 0 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, color2 ) end addEventHandler("onClientRender", root, function () local data = getElementData(getResourceRootElement(getThisResource()), "AdminMessage") or {false, "", "N/A"} local text = data[2] if data[1] then dxDrawBorderedText("#1a75ffAdmin : #FFFFFF"..text, 33, 221, 205, 242, tocolor(255, 255, 255, 255), 1.0, "default-bold", "left", "top", true, false, true, true, true) end end )
    1 point
  10. I know the basics of MTA LUA that's not an issue. It's that I haven't used Shaders before, it's not my strongest sector of MTA Scripting. It's fine, I think I've got the hang of it by playing around with it for a few hours.
    1 point
×
×
  • Create New...