Jump to content

فاّرس

Members
  • Posts

    4,805
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by فاّرس

  1. eif = elseif هذي متغيرات الماركرات, oH1 = createMarker(...) eH1 = createMarker(...) والمتغير يفيدك يتخزين قيمه معينه بداخله
  2. مالهم اي فايده ذذ, ذي متغيرات للقيَم
  3. 90% فوتوشوب باين الخلفيه البيضاء وبعدين السيرفرات وصلت لـ 500 وانتوا توككم
  4. مافي شيء كامل سوي الكود انت , يعني متغير زود قيمته واحفظه بالداتا وانتهت السالفه var = 0 var = var + 1 ^ كلينت
  5. سوي متغير وزود قيمته واحفظه في المنت داتا او اكاونت داتا, var -- متغير بقيمه صفر setElementData getElementData
  6. ضيف, local x,y,z = unpack(Race.Position[math.random(#Race.Position)]) setElementPosition(source,x,y,z) onPlayerChat في حدث
  7. وهذا الي سويته , وياريت تجرب قبل ترد -__-"
  8. viewtopic.php?f=164&t=48230 ^ عشان تعرف الابعاد وتقدر تحط احداثياتك بسهوله
  9. setElementPosition ما اشوف ان الكود فيه
  10. -- Server Side # ver = "" rRoot = getResourceRootElement(getThisResource()) local root = getRootElement() local Key = "F4" Teams = { -- here all team name {"Grove", 0, 255, 0}, {"Aztecas", 0, 150, 255}, {"Police", 0, 50, 255}, {"Ballas", 255, 0, 150}, {"No Team", 255, 0, 0}, {"Medic", 6, 183, 248} } local Table = { {x,y,z}, {x,y,z}, {x,y,z} } local function set(plr, data, bole) if not isElement(plr) then return end return setElementData(plr, data, bole) end local function get(plr, data) if not isElement(plr) then return end return getElementData(plr, data) end addEventHandler("onResourceStart", resourceRoot, function() setGameType("GangWars") outputChatBox("" .. ver .. "", root, 0, 255, 0, true) setTimer(OutPut, 50, 1, "" .. ver .. "", root, 0, 255, 0) for _,theTeam in ipairs(Teams) do createTeam(theTeam[1], theTeam[2], theTeam[3], theTeam[4]) end for _,AllTeams in ipairs(getElementsByType("team")) do if getTeamFriendlyFire(AllTeams) == true then setTeamFriendlyFire(AllTeams, false) end end setTeamFriendlyFire(getTeamFromName("No Team"), true) for i,v in ipairs(getElementsByType("player")) do bindKey(v, Key, "down", "changeTeame") setElementData(v, "OnJoinFirstSpawn", false) end setElementData(rRoot,"maxPlayer",getMaxPlayers()) end ) addEventHandler("onResourceStop", resourceRoot, function() local players = getElementsByType("player") for k,v in ipairs(players) do set(v, "hjwalah", false) set(v, "Grove", false) set(v, "Aztecs", false) set(v, "Police", false) set(v, "Ballas", false) set(v, "noTeam", false) set(v, "Medic", false) set(v, "GameModeActive", false) end end ) addEvent("onLoadedClient", true) addEventHandler("onLoadedClient", root, function(player) versionDisplay = textCreateDisplay() local versionText = textCreateTextItem("" .. ver .. "", 0.975, 0.02, "medium", 255, 0, 0, 255, 1.1, "right") textDisplayAddText(versionDisplay, versionText) textDisplayAddObserver(versionDisplay, player) setElementData(player, "CancleFirstSpawn", true) playSoundFrontEnd(player, 16) OutPut("", player, 255, 255, 0) setElementData(player, "OnJoinFirstSpawn", false) end ) addEventHandler("onPlayerJoin", root, function() showTextForPlayer ( source, 6000, 255, 0, 0, 1.5, "") showTextForPlayer1 ( source, 6000, 255, 0, 0, 1.5, "") setCameraMatrix(source,512.2, -925,895,5,-1065,875,35,0,50) end ) addEventHandler("onPlayerSpawn", root, function() checkWeapon(source) end ) function checkWeapon(player) setTimer(function(player) if isElement(player) then if getElementData(player, "Police") == true then giveWeapon(player, 3) end else takeWeapon(player, 3) end end, 800, 1, player) end addEvent("onClientWantsToSpawn", true) addEventHandler("onClientWantsToSpawn", getRootElement(), function(player, ID, TeamName) if TeamName == "Grove" then setElementData(player, "ID", ID) GroveTeam(player) elseif TeamName == "Aztecas" then setElementData(player, "ID", ID) AztecsTeam(player) elseif TeamName == "Police" then setElementData(player, "ID", ID) PoliceTeam(player) elseif TeamName == "Ballas" then setElementData(player, "ID", ID) Ballas(player) elseif TeamName == "No Team" then setElementData(player, "ID", ID) NoTeam(player) elseif TeamName == "Medic" then setElementData(player, "ID", ID) MedicTeam(player) elseif TeamName == "Drift" then setElementData(player, "ID", ID) hjwalah(player) end end ) function checkWeapon(player) setTimer(function(player) if isElement(player) then if getElementData(player, "Police") == true then giveWeapon(player, 3) end else takeWeapon(player, 3) end end, 800, 2, player) end function onSelectTeam(player) if not isElement(player) then return end local playerTeam = getPlayerTeam(player) OutPut("", player, 255, 255, 255) local playeraccount = getPlayerAccount(player) if playeraccount and not isGuestAccount(getPlayerAccount(player)) then if getElementData(player, "hjwalah") == true then return false end if getElementData(player, "wasgied") == true then return false end setElementData(player, "wasgied", true) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") local wanted = getAccountData(playeraccount, "WantedLevel") if tonumber(wanted) then setPlayerWantedLevel(player, wanted) elseif tonumber(weap0) then giveWeapon(player, weap0, 1) elseif tonumber(weap1) then giveWeapon(player, weap1, 1) elseif tonumber(weap2) and tonumber(ammo2) then giveWeapon(player, weap2, ammo2) elseif tonumber(weap3) and tonumber(ammo3) then giveWeapon(player, weap3, ammo3) elseif tonumber(weap4) and tonumber(ammo4) then giveWeapon(player, weap4, ammo4) elseif tonumber(weap6) and tonumber(ammo5) then giveWeapon(player, weap5, ammo5) elseif tonumber(weap6) and tonumber(ammo6) then giveWeapon(player, weap6, ammo6) elseif tonumber(weap7) and tonumber(ammo7) then giveWeapon(player, weap7, ammo7) elseif tonumber(weap8) and tonumber(ammo8) then giveWeapon(player, weap8, ammo8) elseif tonumber(weap9) and tonumber(ammo9) then giveWeapon(player, weap9, ammo9) elseif tonumber(weap10) then giveWeapon(player, weap10, 30) elseif tonumber(weap11) then giveWeapon(player, weap11, 30) elseif tonumber(weap12) then giveWeapon(player, weap12, 10) end end end function camera(plr) if not isElement(plr) then return end setTimer(fadeCamera, 50, 1, plr, false, 1) setTimer(fadeCamera, 100, 1, plr, true, 3) setCameraTarget(plr, plr) showChat(plr, true) end addEventHandler("onPlayerSpawn", root, function() setElementData(source, "FristTimeSpawn", false) bindKey(source, Key, "down", "changeTeame") setElementData(source, "WasChangeTeam", false) end ) Change = false addCommandHandler("changeTeame", function(plr) if getElementData(plr, "WasChangeTeam") == false then setElementData(plr, "ChangeTeam", true) outputChatBox("سوف يتم تغير الشخصية بعد ان تموت", plr, 0, 255, 0) setTimer(cancleTeam, 1700, 1, plr) setElementData(plr, "WasChangeTeam", true) else outputChatBox("تم الغاء عملية تغير الشخصية بعد الموت", plr, 255, 255, 255) setElementData(plr, "ChangeTeam", false) setElementData(plr, "WasChangeTeam", false) end Change = not Change end ) function cancleTeam(plr) if Change == false then
  11. عندك مشكله في ايفنت الماركر حاط اسم الماركر ومسوي شرط زايد , وناقصك تحقق من اللاعب
  12. فاّرس

    *

    اساسا ذي ما تعتبر خطف للمعلومية, ذي كلها ماركر وتفتح لك النافذه وتضغط الزر وتدخل تيم وتقتل اي احد وينتقل ويصير له فريز ويعطيك فلوس وبعد 5 دقايق يفك الفريز وينقله لإحداثيات ثانية
  13. فاّرس

    *

    وش المشكله الحين؟
  14. هي اساسا موجوده بالكود !
  15. فاّرس

    *

    اطرح ملف سيرفر وكلنت كامله
  16. فاّرس

    *

    اي مود ؟؟ كيف ما نفع ؟ لازم يكون في واحد معك عشان تقتله وتصير المهمه
  17. فاّرس

    *

    -- Client Side # GUIEditor = { button = {}, window = {}, label = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot,function() GUIEditor.window[1] = guiCreateWindow(409, 184, 284, 402, "[ SystemKidnapping ]By MemoPrince+Mr.SAAD", false) guiSetVisible(GUIEditor.window[1],false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.69) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF0F4EEF") GUIEditor.button[1] = guiCreateButton(10, 250, 290, 101, "اخذ الوظيفة = get", false,GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF060CF5") GUIEditor.label[1] = guiCreateLabel(10, 370, 276, 25, "Created By: Sonik", false,GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 8, 250, 2) GUIEditor.memo[1] = guiCreateMemo(10, 50, 270, 190, "وظيفة الخطف: ~>\nعبارة عن ان تضغط زر \" اخذ الوظيفة \" سوف \nيتم ادخلك تيم المجرمين الذين يستطعون\nخطف اي الاعب فقط عليك بقتل اي لاعب وسوفو\nوسوف تربح 1500$ من المال\n----------------------------------------------------------\nفريق العمل :\nSonik + MemoPrince + Mr.SAAD + DarkGhost", false,GUIEditor.window[1]) end ) local marker = createMarker(814.3, -1105.9, 25.7,'cylinder',2, 0,255, 0, 255) addEventHandler('onClientMarkerHit', marker,function(hitPlayer) if ( hitPlayer == localPlayer ) then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end ) addEventHandler ('onClientGUIClick', root,function () if ( source == GUIEditor.button[1] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) triggerServerEvent ( 'SetTeam', localPlayer) end end )
  18. فاّرس

    *

    يا حبيبي غير احداثيات الزر والاديت يعني نقص وزود لين تضبط معك
  19. فاّرس

    *

    عدل بالاحداثيات بالارقام شقلب شوي ذذ
  20. فاّرس

    *

    جرب, -- Server Side # createTeam('Kidnapping',255,0,0) local timer = {} local timerS = {} addEventHandler( 'onPlayerWasted',root,function(attacker) if ( attacker ) and ( attacker ~= source ) and ( getElementType(attacker) == 'player' ) then if ( getPlayerTeam(attacker) ) and ( getTeamName(getPlayerTeam(attacker)) == 'Kidnapping' ) then createBlipAttachedTo(attacker,33) outputChatBox('1000 $ لقد حصلت على',attacker,255,255,0,true) givePlayerMoney(attacker,1000) if not timer[source] or not timerS[source] then timer[source] = setTimer(function() spawnPlayer(source, 812.29241943359,-1100.7707519531,25.786060333252, 0,math.random (0,288)) setElementFrozen(source,true) outputChatBox('بخطفك [ '..getPlayerName(attacker).. ' ] قام اللاعب',source,255,255,0,true) end,2000,1,source) timerS[source] = setTimer(function() setElementFrozen(source,false) setElementPosition(source,896.5, -1114.9, 24.2) outputChatBox('انت الآن حر',source) end,300000,1,source) end end end end ) addEvent( 'SetTeam', true ) addEventHandler( 'SetTeam', root,function() setPlayerTeam ( source, getTeamFromName('Kidnapping' )) end )
  21. فاّرس

    *

    سوي التايمر داخل الحدث , بسيطه ركز بالكود الي سويته وسوي مثله
  22. فاّرس

    *

    اقصد هو كذا, GUIEditor.button[1] = guiCreateButton(468, 426, 171, 101, "اخذ الوظيفة = get", false) يصير كذا, GUIEditor.button[1] = guiCreateButton(468, 426, 171, 101, "اخذ الوظيفة = get", false,GUIEditor.window[1]) طبعا يمكن يختفي الزر لأن لازم تعدل الاحداثيات ذذ وسوي نفس الشيء مع الاديت بالنسبه انه يطلع بعد 5 دقايق سوي تايمر ويفك الفريز وينقله بسيطه ذذ setTimer setElementFrozen -- false setElementPosition
×
×
  • Create New...