Jump to content

^#Dream

Members
  • Posts

    236
  • Joined

  • Last visited

Everything posted by ^#Dream

  1. function findIDForPlayer(thePlayer) if thePlayer and not getElementData(thePlayer,"ID") then local i = 0 local players = getElementsByType("player") repeat local foundID = false i = i + 1 for _,player in pairs(players) do if player ~= thePlayer then local playerID = tonumber(getElementData(player,"ID")) if playerID == i then foundID = true break end end end until not foundID setElementData(thePlayer,"ID",i) end end وحطيت السورس بالفنكشن مازبط
  2. السلام عليكم عندي مشكلة بالسكور بورد if column.name == "country" and content ~= "?" then local countryName = getCountryNameFromCode(content) or content local countryString = ":admin/client/images/flags/"..content:lower()..".png" if fileExists(countryString) then local imageX = (dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )-s(4))*1.4 dxDrawImage(topX+theX+s(1), y+s(3), imageX,dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont )-s(5),countryString,0,0,0,tocolor(255,255,255,a or 255)) dxDrawText( countryName, topX+theX+s(6)+imageX, y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( countryName, topX+theX+s(5)+imageX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) else dxDrawText( countryName, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( countryName, topX+theX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) end else dxDrawText( content, topX+theX+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) dxDrawText( content, topX+theX, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI ) end end end واذا شغلت السكور بورد يقولي [16:45:23] ERROR: scoreboard\dxscoreboard_exports.lua:295: call: failed to call 'admin:getPlayerCountry' والسطر 295 من ملف اكسبورتس function onServerIDStart() for i,thePlayer in pairs(getElementsByType("player")) do findIDForPlayer(thePlayer) local country = call(getResourceFromName("admin"),"getPlayerCountry",source) if country then setElementData(source,"country",country) else setElementData(source,"country","?") end end end addEventHandler("onResourceStart",resourceRoot,onServerIDStart)
  3. ^#Dream

    طلب

    آبيه مثلا لو اللاعبين بقروب المودريتور واذا مانفعت السريال يكون آحسن
  4. ^#Dream

    طلب

    السلام عليكم طلبي هو : ابي مثلا لو مثلا لاعب على حسب رتبته وماكان حاط قبل نكه شعار السيرفر مايدخله السيرفر او باستخدام السريال ياليت تفيدوني
  5. السلام عليكم مدري اذا ذا القسم الصحيح :] انا ابي لي قيم مود ريس دورت عليه ومالقيته لي يومين ادور عليه صورة للقيم مود :
  6. طيب ليش مكتوب بعنوان الصفحة EAGLEI العرب ؟
  7. السلام عليكم ابي اعرف مثلا لو شريت مشروب ولا شراها اللاعب يحط بيد اللاعب علبة ويخليه يشربها
  8. مآبي افتح موضوع جديد آبي اعرف وش المشكلة هنا كل مانتحر مايرسبني من جديد الكاميرا ترتفع فوق ومارسبن سيرفر g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_PlayerData = {} g_VehicleData = {} local chatTime = {} local lastChatMessage = {} g_ArmedVehicles = { [425] = true, [447] = true, [520] = true, [430] = true, [464] = true, [432] = true } g_Trailers = { [606] = true, [607] = true, [610] = true, [590] = true, [569] = true, [611] = true, [584] = true, [608] = true, [435] = true, [450] = true, [591] = true } g_RPCFunctions = { addPedClothes = { option = 'clothes', descr = 'Modifying clothes' }, addVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, fadeVehiclePassengersCamera = true, fixVehicle = { option = 'repair', descr = 'Repairing vehicles' }, giveMeVehicles = { option = 'createvehicle', descr = 'Creating vehicles' }, giveMeWeapon = { option = 'weapons.enabled', descr = 'Getting weapons' }, givePedJetPack = { option = 'jetpack', descr = 'Getting a jetpack' }, killPed = { option = 'kill', descr = 'Killing yourself' }, removePedClothes = { option = 'clothes', descr = 'Modifying clothes' }, removePedFromVehicle = true, removePedJetPack = { option = 'jetpack', descr = 'Removing a jetpack' }, removeVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, setElementAlpha = { option = 'alpha', descr = 'Changing your alpha' }, setElementPosition = true, setElementInterior = true, setMyGameSpeed = { option = 'gamespeed.enabled', descr = 'Setting game speed' }, setMySkin = { option = 'setskin', descr = 'Setting skin' }, setPedAnimation = { option = 'anim', descr = 'Setting an animation' }, setPedFightingStyle = { option = 'setstyle', descr = 'Setting fighting style' }, setPedGravity = { option = 'gravity.enabled', descr = 'Setting gravity' }, setPedStat = { option = 'stats', descr = 'Changing stats' }, setTime = { option = 'time.set', descr = 'Changing time' }, setTimeFrozen = { option = 'time.freeze', descr = 'Freezing time' }, setVehicleColor = true, setVehicleHeadLightColor = true, setVehicleOverrideLights = { option = 'lights', descr = 'Forcing lights' }, setVehiclePaintjob = { option = 'paintjob', descr = 'Applying paintjobs' }, setVehicleRotation = true, setWeather = { option = 'weather', descr = 'Setting weather' }, spawnMe = true, warpMe = { option = 'warp', descr = 'Warping' } } g_OptionDefaults = { alpha = true, anim = true, clothes = true, createvehicle = true, gamespeed = { enabled = true, min = 0.0, max = 3 }, gravity = { enabled = true, min = 0, max = 0.1 }, jetpack = true, kill = true, lights = true, paintjob = true, repair = true, setskin = true, setstyle = true, spawnmaponstart = true, spawnmapondeath = true, stats = true, time = { set = true, freeze = true }, upgrades = true, warp = true, weapons = { enabled = true, vehiclesenabled = true, disallowed = {} }, weather = true, welcometextonstart = true, vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 2, disallowed = {} } } function getOption(optionName) local option = get(optionName:gsub('%.', '/')) if option then if option == 'true' then option = true elseif option == 'false' then option = false end return option end option = g_OptionDefaults for i,part in ipairs(optionName:split('.')) do option = option[part] end return option end addEventHandler('onResourceStart', g_ResRoot, function() table.each(getElementsByType('player'), joinHandler) end ) function joinHandler(player) if not player then player = source end local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) setPlayerNametagColor(player, r, g, b) g_PlayerData[player] = { vehicles = {} } g_PlayerData[player].blip = createBlipAttachedTo(player, 0, 2, r, g, b) if g_FrozenTime then clientCall(player, 'setTimeFrozen', true, g_FrozenTime[1], g_FrozenTime[2], g_FrozenWeather) end if getOption('welcometextonstart') then outputChatBox('=[ Welcome ]=', player, 0, 255, 0) end end addEventHandler('onPlayerJoin', g_Root, joinHandler) addEvent('onLoadedAtClient', true) addEventHandler('onLoadedAtClient', g_ResRoot, function(player) if getOption('spawnmaponstart') and isPedDead(player) then clientCall(player, 'showWelcomeMap') end end, false ) addEventHandler('onPlayerWasted', g_Root, function() if not getOption('spawnmapondeath') then return end local player = source setTimer( function() if isPedDead(player) then clientCall(player, 'showMap') end end, 2000, 1 ) end ) addEvent('onClothesInit', true) addEventHandler('onClothesInit', g_Root, function() local result = {} local texture, model -- get all clothes result.allClothes = {} local typeGroup, index for type=0,17 do typeGroup = {'group', type = type, name = getClothesTypeName(type), children = {}} table.insert(result.allClothes, typeGroup) index = 0 texture, model = getClothesByTypeIndex(type, index) while texture do table.insert(typeGroup.children, {id = index, texture = texture, model = model}) index = index + 1 texture, model = getClothesByTypeIndex(type, index) end end -- get current player clothes { type = {texture=texture, model=model} } result.playerClothes = {} for type=0,17 do texture, model = getPedClothes(source, type) if texture then result.playerClothes[type] = {texture = texture, model = model} end end triggerClientEvent(source, 'onClientClothesInit', source, result) end ) addEvent('onPlayerGravInit', true) addEventHandler('onPlayerGravInit', g_Root, function() triggerClientEvent('onClientPlayerGravInit', source, getPedGravity(source)) end ) function setMySkin(skinid) if isPedDead(source) then local x, y, z = getElementPosition(source) if isPedTerminated(source) then x = 0 y = 0 z = 3 end local r = getPedRotation(source) local interior = getElementInterior(source) spawnPlayer(source, x, y, z, r, skinid) setElementInterior(source, interior) setCameraInterior(source, interior) else setElementModel(source, skinid) setElementHealth(source, 100) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, math.random(9, 288)) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function warpMe(targetPlayer)
  9. الله يعطيك العافية طيب لو ابي اشيل كل الجنوط لاني حاط اكثر من واحد
  10. السلام عليكم ابي اعرف كيف اللاعب اذا ماضغط على الرو يرجعه للجنط الاصلي مسوي كذا if row == "" then return addVehicleUpgrade ( Vehicle, ؟) end بس ابي اعرف وش رقم الجنط الاصلي دورت مالقيت #
  11. سكربت جميل بس لو انك حطيت فيها Edit عشان يقدر يحط الكلام فيه :] والله يعطيك العافية
  12. آلسسلآم عليكم local BannedIDs = { 432, 532 } local rootElem = getRootElement() local thisRoot = getResourceRootElement(getThisResource()) local player = getLocalPlayer() local vehicle local size = 1.2 local modo = 0.01 local score = 0 local screenScore = 0 local tick local idleTime local multTime local driftTime local Yellow = tocolor(31,69,252) local Red = tocolor(234,0,3) local TempCol = Yellow local mult = 1 local tablamult = {350,1400,4200,11200} local anterior = 0 local mejor = 0 local total = 0 local global_mejor = 0 local global_nombre = "N/A" local screenWidth, screenHeight = guiGetScreenSize() local x1,y1,x2,y2 = screenWidth*0.2,screenHeight*0.1,screenWidth*0.8,screenHeight*0.8 addEventHandler("onClientResourceStart", thisRoot, function() addEventHandler("onClientRender", rootElem, showText) outputChatBox("Waiting for server Drift data...") triggerServerEvent("driftClienteListo", rootElem, player) end ) addEventHandler("onClientResourceStop", thisRoot, function() removeEventHandler("onClientRender", rootElem, showText) end ) function isValidVehicle() local temp = getPedOccupiedVehicle(player) if not temp or getVehicleOccupant(temp,0) ~= player or getVehicleType(temp) ~= "Automobile" then return false end local vehID = getElementModel(temp) for k,v in ipairs(BannedIDs) do if vehID == v then return false end end return temp end function showText() dxDrawText(string.format("[ # ] Best Drift : %s - %d",global_nombre,global_mejor),0, 571, 328, 600,Yellow,2.00,"default-bold") vehicle = isValidVehicle() if not vehicle then return end if size > 1.3 then modo = -0.01 elseif size < 1.2 then modo = 0.01 end size = size + modo tick = getTickCount() local angulo,velocidad = angle() local tempBool = tick - (idleTime or 0) < 750 if not tempBool and score ~= 0 then anterior = score setElementData(player, "Last Drift", anterior) total = total+anterior setElementData(player, "Total Drift", total) if score > mejor then mejor = score setElementData(player, "Best Drift", mejor) checkPuntaje(mejor) end triggerEvent("onVehicleDriftEnd", rootElem, tick-driftTime-750) score = 0 end if angulo ~= 0 then if score == 0 then triggerEvent("onVehicleDriftStart", rootElem) driftTime = tick end if tempBool then score = score + math.floor(angulo*velocidad)*mult else score = math.floor(angulo*velocidad)*mult end if TempCol == Red then TempCol = Yellow end screenScore = score idleTime = tick end if tick - (idleTime or 0) < 3000 then local temp = "亗 [ Drift ] 亗" if score >= 300000 then temp = "亗 الدرفت 亗\n\nكفوو ي ششنب اششهدد انكك ذيب" elseif score >= 200000 then temp = "亗 الدرفت 亗\n\nدز ي مجننهم" elseif score >= 150000 then temp = "亗 الدرفت 亗\n\nروووووووح ياشنب عداك العيب" elseif score >= 100000 then temp = "亗 الدرفت 亗\n\nكفوؤوؤو والله كفيت وفيــت ياكنــق" elseif score >= 70000 then temp = "亗 الدرفت 亗\n\nشوطك ي الأمير" elseif score >= 50000 then temp = "亗 الدرفت 亗\n\nهــز الحــديد ياكــنــق" elseif score >= 30000 then temp = "亗 الدرفت 亗\n\nدووووووس ياشنب" elseif score >= 20000 then temp = "亗 الدرفت 亗\n\nكــمـل ياكنــق" elseif score >= 15000 then temp = "亗 الدرفت 亗\n\nكفــووووو يامعـــلــمهــم" elseif score >= 7000 then temp = "亗 الدرفت 亗\n\nعــــداك العــيـــب" elseif score >= 3000 then temp = "亗 الدرفت 亗\n\nدوووس يا شـنـب" elseif score >= 1000 then temp = "亗 الدرفت 亗\n\nكفوِووووووو" end dxDrawText(temp, x1,y1,x2,y2, TempCol, 2.00, "default-bold","center","top", false,true,false) dxDrawText(string.format("\n%d",screenScore), x1,y1-15,x2,y2, TempCol, size, "pricedown","center","top", false,true,false) end end function angle() local vx,vy,vz = getElementVelocity(vehicle) local modV = math.sqrt(vx*vx + vy*vy) if not isVehicleOnGround(vehicle) then return 0,modV end local rx,ry,rz = getElementRotation(vehicle) local sn,cs = -math.sin(math.rad(rz)), math.cos(math.rad(rz)) local deltaT = tick - (multTime or 0) if mult~= 1 and modV <= 0.3 and deltaT > 750 then mult = mult-1 multTime = tick elseif deltaT > 1500 then local temp = 1 if score >= 11200 then temp = 5 elseif score >= 4200 then temp = 4 elseif score >= 1400 then temp = 3 elseif score >= 350 then temp = 2 end if temp>mult then mult = temp multTime = tick end end if modV <= 0.2 then return 0,modV end --speed over 40 km/h local cosX = (sn*vx + cs*vy)/modV if cosX > 0.966 or cosX < 0 then return 0,modV end --angle between 15 and 90 degrees return math.deg(math.acos(cosX))*0.5, modV end addEvent("driftCarCrashed", true) addEventHandler("driftCarCrashed", rootElem, function() if score ~= 0 then score = 0 mult = 1 TempCol = Red triggerEvent("onVehicleDriftEnd", rootElem, 0) end end ) addEvent("driftActualizarRecord", true) addEventHandler("driftActualizarRecord", rootElem, function(score, name) global_mejor = score global_nombre = name end ) function resetScore() anterior,mejor,total = 0,0,0 setElementData(player, "Last Drift", anterior) setElementData(player, "Total Drift", total) setElementData(player, "Best Drift", mejor) end addEvent("driftResetAllScores", true) addEventHandler("driftResetAllScores", rootElem, resetScore) addCommandHandler("resetdrift", resetScore) function checkPuntaje(BestDrift) triggerServerEvent("driftNuevoRecord", rootElem, BestDrift, string.gsub(getPlayerName(player), "#%x%x%x%x%x%x", "")) end function showText() dxDrawText(string.format("[ # ] Best Drift : %s - %d",global_nombre,global_mejor),0, 571, 328, 600,Yellow,2.00,"default-bold") ابيها تجي لكل الشاشات ماعرفت لها
  13. ^ الله يعطيك العافية
  14. السسلام عليكم ابي اعرف كيف اذا اللاعب دخل الماركر بسيارة يقدر يدخل واذا ماكان معه سيارة مايقدر يدخل
  15. ^ مشكور زبط بس اذا قفل النافذه الثانية والي هي NewWindow يروح الماوس لازم يقفل اللوحة ويرجع يفتحها انا ابيه لو قفل النافذه الثانية يبقى الماوس عشان يقدر يضغط على صوره ثانية واذا قفل النافذه الاساسية والي هي Window يروح الماوس
  16. if source == Pic then guiSetVisible ( NewWindow, true ) showCursor ( true ) guiSetInputEnabled ( true ) ^ ذا الي يفتح النافذه + داوي كودك مآزبط
  17. آلسسلآم عليكم انا عندي مشكلة مسوي لوحة يضغط على صوره يفتح له لوحة واذا قفلت اللوحة الي فتحها يرجعني للوحة الاصلية واضغط اف 5 يبقى الماوس موجود مآيروحح local Key = "F5" bindKey(Key,"Down",function() if ( guiGetVisible(Window) == true ) then guiSetVisible(Window,false) showCursor(false) else guiSetVisible(Window,true) showCursor(false) end end) addEventHandler ( "onClientGUIClick", root, function ( ) if source == Pic then guiSetVisible ( NewWindow, true ) showCursor ( true ) guiSetInputEnabled ( true ) elseif source == CloseWindow then guiSetVisible ( NewWindow, false ) showCursor ( false ) end end )
  18. جربت استخدمه بس مآصلح
  19. السلام عليكم function movetocenter(move_window) local kemo = 0 local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(move_window,false) local x = (screenW-windowW)/2 - 1000 local y = (screenH-windowH)/2 guiSetPosition(move_window,x,y,false) guiSetVisible(move_window,true) setTimer(function() kemo = kemo + 50 guiSetPosition(move_window,x+kemo ,y,false) end,300, 20) end ^ ذا كود كيمو حق تحريك النافذه من اليسار الى الوسط بس المشكلة ماعرفت اخليه يجي من الوسط الى تحت يعني الحين الاحداثيات حقت النافذه تجي بالوسط وانا مخليه تحت Window = guiCreateStaticImage(0, 465, 800, 135, "ScriptBG.png", false)
  20. ^ مدام رسمكم كذا http://sketchtoy.com/60979187 ^ آحتراف
  21. http://sketchtoy.com/63049561 ^ مآعليكم من النخلة والشجرة المعوقة هههههههههههههههههههههههههههههههههه # وش رآيكم بالفن #
  22. ^#Dream

    طلب

    ^ طيب سو createPed + setCameraMatrix عشان يسوي الشخصية + يودي الكاميرا للشخصية
×
×
  • Create New...