Jump to content

Max+

Members
  • Posts

    1,363
  • Joined

  • Last visited

Everything posted by Max+

  1. Max+

    Rules

    Ok , Thank's for the advise
  2. Max+

    Rules

    Yeah , Sorry i forgot, dx have to be only Render events non of us are perfect
  3. يب , تقدر اذا ماكان مدمج مع الشاشه , في PC يكون مدمج مع الشاشه ماتقدر تعدل فيه اما كل واحد مستقل تقدر . . كل رام بسعر , وكل كرت بسعر حسب المواصفات , بالنسبة للي راماات Kingston افضل نوع , + كرت شاشه GTX 760 2 GB بس غالي بــ 938 ريال 250 دولار . .
  4. Yes, options2 is defined and in OOP you don't have add the element as an argument, that's what grid: does. Thanks for trying to help though. what is , OOP ? and did you try this script ?
  5. viewtopic.php?f=91&t=35778
  6. Max+

    Rules

    CODE REMOVED BY Solidsnake14
  7. function makeGui ( ) window = GuiWindow.create(334, 104, 710, 479, "Nerd Gaming Help", false) window.setSizable = false; grid = GuiGridlist.create(356, 34, 274, 150, false, window) --guiGridListAddColumn(grid, "", 0.9) grid:addColumn (grid, "", 0.9 ) --- you must add the gridlist you want to add the column for img = GuiStaticImage.create(61, 34, 272, 150, ":NGLogin/files/logo.png", false, window) info = GuiLabel.create(61, 234, 569, 186, "This is my text", false, window) info:setFont ( "default-bold-small" ) info:setHorizontalAlign ( "left", true ) showCursor ( true ) for i, v in pairs ( options2 ) do ----is this defined ? options2 ? local r = grid:addRow (grid); --- you must add the gridlist you want to add the row for grid:setItemText ( r, 1, tostring ( v [ 1 ] ), false, false ) end end
  8. addEventHandler ( 'onPlayerJoin', root, function ( ) spawnPlayer ( source, 2030.22, -1418.29, 16.99 ) fadeCamera( source, true ) setCameraTarget ( source, source ) outputChatBox ( ' Bem Vindo', source, 255, 255, 0 ) giveWeapon ( source, 31, 200 ) -- Gives the M4 weapon with 200 ammo giveWeapon ( source, 26, 200 ) -- Gives the sawnoff weapon with 200 ammo giveWeapon ( source, 24, 200 ) -- Gives the deagle weapon with 200 ammo end ) addEventHandler( "onPlayerWasted" , root, function() setTimer( spawnPlayer, 5000, 1, source, 2030.22, -1418.29, 16.99 ) triggerEvent ( 'onNextSpawn',source ) --- trigger the other pack and take the old pack end ) addEvent('onNextSpawn', true ) addEventHandler ( 'onNextSpawn', root, function ( ) giveWeapon ( source, 27 , 200 ) giveWeapon ( source, 30, 200 ) giveWeapon ( source, 24, 200 ) takeWeapon ( source, 31) takeWeapon ( source, 26) takeWeapon ( source, 24) outputChatBox(' * Weapons has beeen replaced * ' ,source, 255, 0 , 0 ) end )
  9. and what is ( test ) ?
  10. what do you want to do ? and if there is another code to give weaopns , post it
  11. setTimer( spawnPlayer, 5000, 1, source, spawnX, spawnY, spawnZ )
  12. you Can't detect if player gonna die , and what do you want to do ? if you want if he typed command 'kill' and kill himself then Event : 'onPlayerCommand killPed
  13. وين خطأ واحد طلع عندك 7 سطور ض1 local Display = textCreateDisplay() local CrText = textCreateTextItem("0 Criminal", 0.05, 0.65, "high", 255, 0, 0, 255, 1.2, "center", "center", 255) local VsText = textCreateTextItem("Vs", 0.1, 0.65, "high", 255, 255, 255, 255, 1.2, "center", "center", 255) local PoText = textCreateTextItem("0 Police", 0.15, 0.65, "high", 0, 0, 255, 255, 1.2, "center", "center", 255) textDisplayAddText(Display, CrText) textDisplayAddText(Display, VsText) textDisplayAddText(Display, PoText) CrTable = {} PoTable = {} function updateText() textItemSetText(CrText, #CrTable.." Criminal") textItemSetText(PoText, #PoTable.." Police") end function AddPlayer(player, Table) if not getPlayerTable(player, CrTable) and not getPlayerTable(player, PoTable) then textDisplayAddObserver(Display, player) table.insert(Table, player) setElementData(player, "MissionProtection", true) if Table == CrTable then setPlayerWantedLevel(player, 6) end updateText() end end function RemovePlayer(player, Table) textDisplayRemoveObserver(Display, player) for i, v in ipairs (Table) do if (v == player) then table.remove(Table, i) setElementData(player, "MissionProtection", false) end end updateText() end function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end addEventHandler("onElementDataChange", root, function(dataName) if dataName == "LegalStatus" and (getPlayerTable(source, CrTable) or getPlayerTable(source, PoTable)) then local LegalStatus = getElementData(source, dataName) if LegalStatus == "Jailed" then if getPlayerTeam(source) ~= getTeamFromName("Police") then RemovePlayer(source, CrTable) elseif getPlayerTeam(source) == getTeamFromName("Police") then RemovePlayer(source, PoTable) end checkForWinner() end end end) setPlayerWantedLevel_ = setPlayerWantedLevel function setPlayerWantedLevel(player, level) local stat = setPlayerWantedLevel_(player, level) if stat then setElementData(player, "WantLvl", level) end return stat end local CrM = createMarker(476.7, -1488.7, 19.2, "arrow", 2, 255, 0, 0, 150) local PoM = createMarker(474.5, -1509, 19.5, "arrow", 2, 0, 0, 255, 150) local CrDoor = createObject(1508, 4342.5, -1649.2, 26.4) local PoDoor = createObject(1508, 4253.1, -1652.4, 26.4) createBlip(475.4, -1501.57, 20.5, 32) addEventHandler("onResourceStart", resourceRoot, function() exports ["guimessages"] : outputServer(root, "* Go to the red house!!", 50, 0, 255) exports ["guimessages"] : outputServer(root, "Sniper Mission will begin after 5 minutes!", 255, 50, 0) exports ["guimessages"] : outputServer(root, "*For Gangster : Enter at Red Marker !", 255, 50, 0) exports ["guimessages"] : outputServer(root, "*For Police : Enter at Blue Marker!", 0, 50, 255) standByMission = setTimer(function() moveObject(CrDoor, 3500, 4342.5, -1649.2, 29.4) moveObject(PoDoor, 3500, 4253.1, -1652.4, 29.4) exports ["guimessages"] : outputServer(root, "Sniper Mission Started!!!", 0, 150, 255) setTimer(checkForWinner, 1000, 1, true) end, 5*60*1000, 1) end) function getTimeLeft(Timer) if startTheMission == Timer then ms = getTimerDetails(Timer) + 300000 else ms = getTimerDetails(Timer) end local m = math.floor(ms/60000) local s = math.floor((ms-m*60000)/1000) if m < 10 then m = ""..m end if s < 10 then s = ""..s end return "("..m.." Min and "..s.." Sec)" end addCommandHandler("snipertime", function(player) if isTimer(standByMission) then exports ["guimessages"] : outputServer(player, "Time left before Sniper Mission Start: "..getTimeLeft(standByMission), 0, 255, 0) elseif isTimer(startTheMission) then exports ["guimessages"] : outputServer(player, "Time left before Sniper Mission Start: "..getTimeLeft(startTheMission), 0, 255, 0) else exports ["guimessages"] : outputServer(player, "Sniper Mission is in progress now!", 0, 255, 0) end end) local PolicePosition = { {7666.8, -914.6, 9.1}, {7665.4, -909.1, 9.1}, {7668.6, -904.8, 9.1}, {7664.7, -897.9, 9.1}, {7668.9, -894.3, 9.1}, {7656.9, -895.9, 9.1}, {7654.1, -904.5, 9.1}, {7652.6, -914.1, 9.1} } local PoliceOutPosition = { {216.6, 76.57, 1005.2}, {216.3, 80.5, 1005.2}, {219.83, 79.8, 1005.2} } local CriminalPosition = { {7998.4, -916.3, 9.1}, {7993.7, -916.1, 9.1}, {7994.1, -910.6, 9.1}, {7994.4, -899.1, 9.1}, {8001.2, -899.2, 9.1}, {8004.9, -906.1, 9.1}, {8010.5, -915.2, 9.1} } local CriminalOutPosition = { {486.5, -1492.6, 20.2}, {487.2, -1474.7, 19.2}, {492.6, -1469.85, 18.55}, {489.4, -1464.85, 18.3}, {487.1, -1503.9, 20.4}, {483.1, -1515.1, 20.3}, {489.4, -1526.2, 19.77}, {485.1, -1534.1, 19.4} } addEventHandler("onMarkerHit", root, function(player) if getElementType(player) == "player" and not isPedInVehicle(player) then if isTimer(standByMission) then if source == CrM and getPlayerTeam(player) ~= getTeamFromName("Police") then local x, y, z = unpack(CriminalPosition[math.random(#CriminalPosition)]) setElementPosition(player, x, y, z) AddPlayer(player, CrTable) elseif source == PoM and getPlayerTeam(player) == getTeamFromName("Police") then local x, y, z = unpack(PolicePosition[math.random(#PolicePosition)]) setElementPosition(player, x, y, z) AddPlayer(player, PoTable) end end end end) TopKill = {} function sortTop() sortedTopKill = {} for a, b in pairs(TopKill) do table.insert(sortedTopKill, {getPlayerName(a), b}) end table.sort(sortedTopKill, function(a,b) return a[2] > b[2] end) end addEventHandler("onPlayerWasted", root, function(_, killer) if getPlayerTable(source, CrTable) or getPlayerTable(source, PoTable) then if killer and getElementType(killer) == "player" then exports ["guimessages"] : outputServer(root, getPlayerName(killer).." Killed "..getPlayerName(source).." in Sniper Mission!", 255, 0, 255) TopKill[killer] = (TopKill[killer] or 0) + 1 else exports ["guimessages"] : outputServer(root, getPlayerName(source).." dead in Sniper Mission!", 255, 0, 255) end if getPlayerTeam(source) ~= getTeamFromName("Police") then RemovePlayer(source, CrTable) elseif getPlayerTeam(source) == getTeamFromName("Police") then RemovePlayer(source, PoTable) end end checkForWinner() end) addEventHandler("onPlayerQuit", root, function() if getPlayerTable(source, CrTable) or getPlayerTable(source, PoTable) then if getPlayerTeam(source) ~= getTeamFromName("Police") then RemovePlayer(source, CrTable) elseif getPlayerTeam(source) == getTeamFromName("Police") then RemovePlayer(source, PoTable) end end checkForWinner() end) function checkForWinner(cHk) if cHk then TopKill = {} end if not isTimer(standByMission) and not isTimer(startTheMission) then if #CrTable > 0 and #PoTable == 0 then if not cHk then exports ["guimessages"] : outputServer(root ,"The Criminals won the Sniper Mission!", 255, 100, 0) exports ["guimessages"] : outputServer(root ,"--| Top Kills of Sniper Mission |--", 255, 255, 0) sortTop() if sortedTopKill[1] then exports ["guimessages"] : outputServer(root ,"1. "..sortedTopKill[1][1]..": "..sortedTopKill[1][2], 255, 0, 255) end if sortedTopKill[2] then exports ["guimessages"] : outputServer(root ,"2. "..sortedTopKill[2][1]..": "..sortedTopKill[2][2], 255, 0, 255) end if sortedTopKill[3] then exports ["guimessages"] : outputServer(root ,"3. "..sortedTopKill[3][1]..": "..sortedTopKill[3][2], 255, 0, 255) end else exports ["guimessages"] : outputServer(root ,"The Sniper Mission was Draw!", 255, 0, 0) end for _, p in ipairs (CrTable) do textDisplayRemoveObserver(Display, p) if not cHk then setElementData(player, "Money", (getElementData(player, "Money") + 30000 ) ) local x, y, z = unpack(CriminalOutPosition[math.random(#CriminalOutPosition)]) setElementPosition(p, x, y, z) setElementData(p, "MissionProtection", false) CrTable = {} PoTable = {} updateText() startTheMission = setTimer(function() exports ["guimessages"] : outputServer(root ,"* Go to the red house!!", 50, 0, 255) exports ["guimessages"] : outputServer(root ,"Sniper Mission will begin after 5 minutes!", 255, 50, 0) exports ["guimessages"] : outputServer(root ,"*For Gangster : Enter at Red Marker !", 255, 50, 0) exports ["guimessages"] : outputServer(root ,"*For Police : Enter at Blue Marker!", 0, 50, 255) moveObject(CrDoor, 3500, 4342.5, -1649.2, 26.4) moveObject(PoDoor, 3500, 4253.1, -1652.4, 26.4) standByMission = setTimer(function() moveObject(CrDoor, 3500, 4342.5, -1649.2, 29.4) moveObject(PoDoor, 3500, 4253.1, -1652.4, 29.4) exports ["guimessages"] : outputServer(root ,"Sniper Mission Started!!!", 0, 150, 255)
  14. والله غريب مشكلتك سوي فورمات وريح اذا حتى ازالة ماضبط . . .
  15. مستحيل ماينفع ! شكل الا mta عندك مضروب مره , رح ازالة البرامج واحذف mta تجيك اول نافذة حط يس النافذه الثانية حط نو عشان يحذف اعداداتك , بعد مايخلص رح احذف المجلد اسمه mta بــ ProgramFiles , وثبتها من جديد وامورك بالسمبتيك
  16. روح خش اي سيرفر واكتب في اف 8 showhud 1 تاكد نفس الكلمة انسخها والصقها في اف 8 واضغط انتر 1 -اظهار 0- اخفاء
  17. في اخطاء بالسكربت ماقفلته , جرب الحين , addEventHandler("onPickupHit",root, function ( player ) if ( source ~= bag ) then return end if ( isPedInVehicle( player ) ) then return end destroyElement( bag ) destroyElement( bl ) randomMoney = math.random ( 10000, 20000 ) setElementData(player, "Money", (getElementData(player, "Money") or 0) + randomMoney) local random = weapons[math.random(#weapons)] giveWeapon (player, random[1], random[2] ) exports.guimessages:outputServer(player, "You find #FF0000$" .. tostring(randomMoney) .." #C12267And #0000FF ".. getWeaponNameFromID ( random[1] ), 0, 250, 0) exports.guimessages:outputServer(root, ""..getPlayerName( player ).." Has Get From Mystery Bag #FF0000$" .. tostring(randomMoney) .." #C12267And #0000FF ".. getWeaponNameFromID ( random[1] ), 0, 250, 0) MysteryTime = setTimer( createBag, 300000, 1 ) end )
  18. اجل ربحنا JPG , MP3 , PNG يدمج باتش والسلام عليكم . . .
  19. i started the scripting when i was 14 it dosnet matter and iam arabic, and english is your mother lang it should be easy for you.
  20. طيب لو يغير الصيغة ؟ يعني مافي امل يخترقك بكذا ؟
  21. خلصنا من مصيبة طلعت مصيبه هههههههههههههه https://wiki.multitheftauto.com/wiki/On ... adComplete
  22. no he mean like BaseMode if the admin start the map in f8 like / arena 20 outputChatBox(adminName.. has Started the map ) he want get the name of the admin started the map ..
  23. trust me you dont need a teacher , Only things you need , English Language and , Read Wiki , and the scripting section is full with scripts , you can read them and understand them , i was really bad with scripting , now i made a UserPanel to set Ranks to players , a round 30 line of Lua codes, and before i couldn't make a simple line , . . .
  24. طيب انت جبت القيمة الاولى والثانية صح ؟ طيب وذي { 38, 300 } والله التيبلات ماعرف بها , + هو مستخدم زي كذا random[1], random[2] بس ماستخدم random[1][2], random[2][1]
×
×
  • Create New...