Jump to content

hassan.k.s.a

Members
  • Posts

    868
  • Joined

  • Last visited

Everything posted by hassan.k.s.a

  1. لأ حبيبي لازم يعشق السلاآح ماتوقع فيه أمل انه مايعشق
  2. آخر رد لي شوفه جاهز الكود ويتانسق مع كودك
  3. اسم الملف markr.lua واسم الملف لذا الكود meta.xml "Jamrawy" version="1.0" type="script" />
  4. الي عطيتك انا كآمل يخوي لاحول هذي المره الرابعه yourname = guiCreateLabel(200,166,555,21,"Your Name : N/A",false,info) guiLabelSetColor(yourname,255,0,0) guiSetText ( yourname, getPlayerName(source)) addEventHandler("onClientRender", getRootElement(), function () if guiGetVisible(info,true) then-- بأسم التاب او النافذهWindow استبدل playerName(yourname," "..getPlayerName(getLocalPlayer()))--بأسم اليبلplayerName استبدل else guiSetText(yourname," "..getPlayerName(getLocalPlayer())) end end)
  5. guiSetText ( playerName, getPlayerName(source)) addEventHandler("onClientRender", getRootElement(), function () if guiGetVisible(Window,true) then-- بأسم التاب او النافذهWindow استبدل playerName(playerName," "..getPlayerName(getLocalPlayer()))--بأسم اليبلplayerName استبدل else guiSetText(playerName," "..getPlayerName(getLocalPlayer())) end end)
  6. function t(player, cmd, ...) local accountname = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Admin" )) then for id, players in ipairs(getElementsByType("player")) do local message = table.concat({...}," ") local textDisplay = textCreateDisplay () local textItem = textCreateTextItem( ""..message, 0.5, 0.5, 2, 205, 0, 0, 255, 3, "center", "center" ) textDisplayAddText ( textDisplay, textItem ) textDisplayAddObserver ( textDisplay, players ) setTimer ( textDestroyTextItem, 5000, 1, textItem ) setTimer ( textDestroyDisplay, 5000, 1, textDisplay ) end else outputChatBox("**Shout Admin",player,255,12,15) end end addCommandHandler("adminshout", t)
  7. اذا كنت تقصد هذا جربه local Marker1 = createMarker(x, y, z, "cylinder", 3, 255, 0, 0, 255) --بلأحداثيات هذا الماركر الأول الي لما تدخله ينقلك للماركر الثاني x,y,z استبدل Marker1 = createMarker(x, y, z, "cylinder", 3, 255, 0, 0, 255)--صنع ماركر ثاني بالمكان الي تريده function WarpMarker(player) setElementPosition(player, x, y, z)--احداثيآت الأنتقال للمكان الي فيه الماركر الثاني end addEventHandler("onClientMarkerHit",Marker1,WarpMarker)
  8. اعمل ماركر ثاني اطرح كودك
  9. طيب اذا الي فهمت كذا ليه استخدم getPedSkin انا بصرآحه مافهمت له آبد ^.^
  10. امسح $** وححط السعر وامسح Name** وحط اسم الشيء مثل ليزر او او الخ وبنسبه لـ jet هذا اسم الزر وبنسبه لـ s1w هذا اسم النافذه وش تبي زياده بعد؟
  11. المود جاهز ومو مشفر خذه واكتب by=ABO.SR7777A هذا اتوقع الي ودك فيه
  12. انا حطيت لك الأزرار جاهزه تحت كل ملف server تحته Button يعني الزر حقه
  13. أتأكد من نسخك للكود ممكن انك زدت = في ألأكواد
  14. Laser ------------ --Client ------------ addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == aLaser ) then triggerServerEvent("aLaser", localPlayer) end end) local dots = {} CMD_LASER = "laser" CMD_LASERCOLOR = "lasercolor" laserWidth = 2 dotSize = .05 localPlayer = getLocalPlayer() picklasercolor = 0 colorPickerInitialized = 0 oldcolors = {r=255,g=0,b=0,a=255} addEventHandler("onClientResourceStart", getRootElement(), function(res) if res == getThisResource() then SetLaserColor(localPlayer, oldcolors.r,oldcolors.g,oldcolors.b,oldcolors.a) if colorPickerInitialized == 0 then initColorPicker() end elseif res == getResourceFromName("colorpicker") then if colorPickerInitialized == 0 then initColorPicker() end end end ) addEventHandler("onClientResourceStop", getRootElement(), function(res) if res == getThisResource() then SetLaserEnabled(localPlayer, false) end end ) addEventHandler("onClientElementDataChange", localPlayer, function(dataName, oldValue) if getElementType(source) == "player" and source == localPlayer and dataName == "laser.on" then local newValue = getElementData(source, dataName) if oldValue == true and newValue == false then unbindKey("aim_weapon", "both", AimKeyPressed) elseif oldValue == false and newValue == true then bindKey("aim_weapon", "both", AimKeyPressed) end end end ) addEventHandler( "onClientRender", getRootElement(), function() local players = getElementsByType("player") for k,v in ipairs(players) do if getElementData(v, "laser.on") then DrawLaser(v) end end end ) addEventHandler( "onClientPreRender", getRootElement(), function() local players = getElementsByType("player") for k,v in ipairs(players) do if getElementData(v, "laser.on") then end end end ) function AimKeyPressed(key, state) if state == "down" then setElementData(localPlayer, "laser.aim", true, true) elseif state == "up" then setElementData(localPlayer, "laser.aim", false, true) end end function DrawLaser(player) if getElementData(player, "laser.on") then local targetself = getPedTarget(player) if targetself and targetself == player then targetself = true else targetself = false end if getElementData(player, "laser.aim") and IsPlayerWeaponValidForLaser(player) == true and targetself == false then local x,y,z = getPedWeaponMuzzlePosition(player) if not x then outputDebugString("getPedWeaponMuzzlePosition failed") x,y,z = getPedTargetStart(player) end local x2,y2,z2 = getPedTargetEnd(player) if not x2 then --outputDebugString("getPedTargetEnd failed") return end local x3,y3,z3 = getPedTargetCollision(player) local r,g,b,a = GetLaserColor(player) if x3 then -- collision detected, draw til collision and add a dot dxDrawLine3D(x,y,z,x3,y3,z3, tocolor(r,g,b,a), laserWidth) DrawLaserDot(player, x3,y3,z3) else -- no collision, draw til end of weapons range dxDrawLine3D(x,y,z,x2,y2,z2, tocolor(r,g,b,a), laserWidth) DestroyLaserDot(player) end else DestroyLaserDot(player) -- not aiming, remove dot, no laser end else DestroyLaserDot(player) end end function DrawLaserDot (player, x,y,z) if not dots[player] then dots[player] = createMarker(x,y,z, "corona", .05, GetLaserColor(player)) else setElementPosition(dots[player], x,y,z) end end function DestroyLaserDot(player) if dots[player] and isElement(dots[player]) then destroyElement(dots[player]) dots[player] = nil end end function SetLaserColor(player,r,g,b,a) setElementData(player, "laser.red", r) setElementData(player, "laser.green", g) setElementData(player, "laser.blue", b) setElementData(player, "laser.alpha", a) return true end function GetLaserColor(player) r = getElementData(player, "laser.red") g = getElementData(player, "laser.green") b = getElementData(player, "laser.blue") a = getElementData(player, "laser.alpha") return r,g,b,a end function IsPlayerWeaponValidForLaser(player) local weapon = getPedWeapon(player) if weapon and weapon > 21 and weapon < 39 and weapon ~= 35 and weapon ~= 36 then return true end return false end function SetLaserEnabled(player, state) -- returns false if invalid params passed, true if successful changed laser enabled if not player or isElement(player) == false then return false end if getElementType(player) ~= "player" then return false end if state == nil then return false end if state == true then -- enable laser setElementData(player, "laser.on", true, true) setElementData(player, "laser.aim", false, true) return true elseif state == false then setElementData(player, "laser.on", false, true) setElementData(player, "laser.aim", false, true) return true end return false end function IsLaserEnabled(player) if getElementData(player, "laser.on") == true then return true else return false end end function initColorPicker() if getResourceFromName("colorpicker") == false then return false end addEventHandler("onClientPickedColor", localPlayer, function(r,g,b,a) if picklasercolor == 1 then SetLaserColor(source,r,g,b,a) end end ) addEventHandler("onClientCancelColorPick", localPlayer, function() if picklasercolor == 1 then SetLaserColor(source,oldcolors.r,oldcolors.g,oldcolors.b,oldcolors.a) picklasercolor = 0 end end ) colorPickerInitialized = 1 return true end ------------- addEvent("LaserWin",true) addEventHandler("LaserWin",root,function() out("Select Your Color",2) LaserWin = guiCreateWindow(494,269,97,150,"Laser Color",false) guiSetVisible(LaserWin,true) guiWindowSetSizable(LaserWin,false) showCursor(true) --- Center Window --- local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(LaserWin,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(LaserWin,x,y,false) ----- Center Window ----- Red = guiCreateRadioButton(10,29,16,14,"",false,LaserWin) guiRadioButtonSetSelected(Red,true) RedL = guiCreateLabel(30,28,69,15,"Red",false,LaserWin) guiLabelSetColor(RedL,255,0,0) Blue = guiCreateRadioButton(10,51,16,14,"",false,LaserWin) BlueL = guiCreateLabel(30,50,69,15,"Blue",false,LaserWin) guiLabelSetColor(BlueL,0,127,255) Green = guiCreateRadioButton(10,71,16,14,"",false,LaserWin) GreenL = guiCreateLabel(30,70,69,15,"Green",false,LaserWin) guiLabelSetColor(GreenL,0,255,0) Yellow = guiCreateRadioButton(10,90,16,14,"",false,LaserWin) YellowL = guiCreateLabel(30,88,69,15,"Yellow",false,LaserWin) guiLabelSetColor(YellowL,255,255,0) LaserOK = guiCreateButton(9,114,74,24,"OK",false,LaserWin) ---- addEventHandler("onClientGUIClick",root,function() if source == LaserOK then R = guiRadioButtonGetSelected(Red) B = guiRadioButtonGetSelected(Blue) G = guiRadioButtonGetSelected(Green) Y = guiRadioButtonGetSelected(Yellow) if R then r,g,b = 255,0,0 elseif B then r,g,b = 0,127,255 elseif G then r,g,b = 0,255,0 elseif Y then r,g,b = 255,255,0 end triggerServerEvent("AfterLaserColor",lp,r,g,b) guiSetVisible(LaserWin,false) showCursor(false) out("You Will Have Laser For 2 Mins",2) end
  15. تقصد الي يكون في اف1 الي على اليمين؟
  16. يقصد skin الشخصيه هع ذي واحد مصممها اطلب الي مصممها يقصد واحد لابس ثوب أخضر كامل
×
×
  • Create New...