Jump to content

GTA San

Members
  • Posts

    150
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTA San

  1. لاههنت ي بطل, ع الشرح المبسط
  2. باالتوفيق لك وعقبال مانشوفك من كبار المبرمجين بس لا تبيع علينا ضضض والموضوع معد تقدر تحذففة
  3. ونقول ولككككم باك ورجعت الاستضافة شوكريأ ي مسستر مايكروأ من يوم تقفلت وانا افرفر بالتنين ادور فيز خبري خبرك ضض وماغير ادور اف بي اس مجاني, وفججاة دخلت لقيتها رجعت من جديد .. شوكريأ الا صح سوال بسيط اي حد يشطف وعندة خبرة يفيدني اقدر اثبت سيرفر او خادم العاب على اف بي اس مجاني : D
  4. sOrry باللتوفيق ي مبددعين وعندي اقتراحات بسيطة الا وهي تواجد الدعم بشكل مستمر, + وفي ثغرة ب x مادري عارفينها ولا لو تمشي فوق ماركر سياارات وانت متعلق فوق سيارة شخص ثاني راح تنزل سيارة تتحكم بها وانت مو داخلها
  5. يولد وش فيك نفسست ههههههههههه انا امززح مع صاحب الموضوع بالعكس السيرفر انا ذلحن فية ومرة ممتع حتى شريت موية وبطاطس ولكن انت شكلك زعول السيرفر افضل من الحياة الواقعية للاجانب من وجهة نظري يكفي ان من ضمن مبرمجينة الانسان المحبوب والخلوق جعفر وتراي ماتكلمت بشيء عن البرمجة لن البرمجة واضح ان ماعليها كلااااام وانتم مبرمجيننا ونفتخخر فيكم لانكم عرب وكلامي مززح لاني فعلأ علقت بالمطار او ماحصلت مكان باب الخروج وطلعني شخص اسمة سفيجي او حاجة زي كذا
  6. مشكلة يجيك واحد استغلالي ماودي اقول نصاب لعدم جرح المشاعر وولكن استغلالي ويقول لناس الي تساعد لا تقطع ارزاق وانت لا تستغل الناس بتعديلات وليست برمجة كاملة وحتى لو شخ بيبرمج برمجة كاملة مجانا هو حر ماستر يارب اشكالك تنقرض ي استغلالية يحبون المال حبا جما والمبرمج يقدر يقبل طريقة الدفع لانها بطاقة يقدر يخزنها معة او يعطيها ل اي حد من اقاربة او صحابة لو مامعة سواء المبرمج الجبل برمج لي زمان اكواد كبر وجهك فقط ب 10 سواء والله اني خليتها 20 من حسن اخلاقة وبرمجتة القوية ولكن انت ماتستاهل لانك استغلالي,
  7. روح لجميع الاشارات واصدمها وراح تختفي او سوي ماب محذوفة فية الاشارات
  8. تعال بيتنا او اجي لك بيتكم نبرمج جميعـأ وبعطيك 1 ريال
  9. ابدعتم في صنع سيرفر زي الخرأ سيرفر معققد لدرجة اني دخلت المطار ماعرفت اطلع
  10. اش مشكلة سيرفر توقف وتطلع لي رسالة خطاء وعتقد كل سيرفرات الاخادم حقك توقفت وش الحل
  11. سلاموعليكم هذا كود لفل استخدمة ومفروض والاكواد تقول انة اذا لاعب اخذ لفل يجي علية ماركر لية مايجي علي ماركر لاخذت لفل جديد local sx, sy = guiGetScreenSize(); local x,y = (sx/1366), (sy/768) local dxfont0_font = dxCreateFont("font.ttf", 11) Markerlevel = {}; CurrentData = getElementData ( localPlayer, "Level") or 1 CurrentText = "Level" function unlerp(from,to,lerp) return (lerp-from)/(to-from) end setTimer(function() if CurrentData == getElementData ( localPlayer, "XP") or 1 and CurrentText == "Exp" then CurrentData = getElementData ( localPlayer, "Level") or 1 CurrentText = "Level" else CurrentData = getElementData ( localPlayer, "XP") or 1 CurrentText = "Exp" end end,10000,0) function dxDrawProgressBar( startX, startY, width, height, progress, color, backColor ) local progress = math.max( 0, (math.min( 100, progress) ) ) local wBar = width*.99 for i = 0, 0 do local startPos = (wBar*i + (width*.0100)*i) + startX dxDrawRectangle( startPos, startY, wBar, height, backColor ) local eInterval = (i*100) local localProgress = math.min( 1, unlerp( eInterval, eInterval + 100, progress ) ) if localProgress > 0 then dxDrawRectangle( startPos, startY, wBar*localProgress, height, color,true ) end end end addEventHandler("onClientRender", root, function() local Level = getElementData ( localPlayer, "Level") or 1 local XP = getElementData ( localPlayer, "XP") or 0 if Level and XP then Prog = ((XP*100)/(Level*150)) local r, g, b = getTeamColor(getPlayerTeam(localPlayer)) dxDrawRectangle(44*x, 731*y, 304*x, 32*y, tocolor(0, 0, 0, 185), false) dxDrawProgressBar( 86*x, 739*y, 244*x, 15*y, Prog, tocolor(r, g, b, 255), tocolor(0, 0, 0, 250) ) dxDrawText("Exp", 49*x, 738*y, 72*x, 758*y, tocolor(255, 255, 255, 255), 1.00, dxfont0_font, "left", "top", false, false, false, false, false) dxDrawText(""..CurrentText.." "..CurrentData.."", 173*x, 736*y, 196*x, 753*y, tocolor(176, 181, 133, 254), 1.00, dxfont0_font, "left", "top", false, false, false, false, false) end end ) Marker = { {"checkpoint"}, {"corona"} } function wonerG() setElementData(localPlayer,"LeftMove",true) setTimer(setElementData,4000,1,localPlayer,"LeftMove",false) setTimer(setElementData,8000,1,localPlayer,"LeftMove",true) setTimer(setElementData,10000,1,localPlayer,"LeftMove",false) setTimer(setElementData,12000,1,localPlayer,"LeftMove",true) setTimer(setElementData,13000,1,localPlayer,"LeftMove",false) setTimer(function() local x, y, z = getElementPosition ( localPlayer ) local Tel = math.random (0,1.5) local Markers = unpack(Marker[math.random(#Marker)]) Markerlevel[localPlayer] = createMarker(x, y, z, Markers, Tel, math.random(255), math.random(255), math.random(255), 255) setTimer(destroyElement,200,1,Markerlevel[localPlayer]) end,100,120) end addEvent("PlayLevelUp",true) addEventHandler("PlayLevelUp",root,wonerG)
  12. local MarkersPosition = { [1] = {1679, -2327.5, 12.5, 0,0}, [2] = {-1385, -355, 13, 100}, [3] = {1711, 1517, 9.7, 180}, -- LV AIR PORT [4] = {2499, -1651.32 ,12.53, 175}, -- GROVE STREET [5] = {1359, -1754, 12.4, 0}, -- POLICE LS [6] = {2216.80591, -1314.92834, 22.98438, 270}, [7] = {2292.79, -1115.81 ,36.98, 90}, zetcas [8] = {1803.1, -1933.42 ,12.39, 0}, [9] = {1182.8, -1315 ,12.64, 270}, [10] = {2007.22, -1440.68 ,12.56, 130}, -- LS HOSPITAL [11] = {2680.76, -1697.33 ,8.41, 55}, -- WWE [12] = {1194.19, -1756.06 ,12.58, 90}, -- NO TEAM [13] = {1144.47, -1465.78 ,14.79, 0}, -- NO TEAM [14] = {1535.13, -1476.71 ,8.5, 0}, -- NO TEAM [15] = {2489.13, -1953.85, 12.42, 0}, -- NO TEAM [16] = {1427.47, -1056.45, 22.16, 0}, -- NO TEAM [17] = {1974.27, -1278.81, 22.82, 0}, -- NO TEAM [18] = {1946.59, -1362.73, 17.58, 90}, -- NO TEAM [19] = {-1861.45, 595.74, 34.17, 0}, -- BANK [20] = {-2136.47, -78.1, 34.32, 0}, -- WAREHOUSE [21] = {333.81, -1519.94, 34.87, 319}, -- Club [22] = {1771.77, -1344.41, 14.76, 177}, -- NO TEAM [23] = {1722.63, -1609.57, 12.55 , 1}, -- NO TEAM [24] = {-2022.86, 155.56, 27.83594 , 0}, -- RIFA [25] = {-2175.38, 704.29, 52.89063 , 180}, -- Triads [26] = {-2107.17, 903.50, 75.48021 , 360}, -- Da Nang [27] = {-2621.01, 1379.10, 6.14884 , 180}, -- Mafia [28] = {-1704.59, 1339.44, 6.18072 , 136}, -- Russians [29] = {1624, 1820, 9.7, 0}, -- LV HOSPITAL [230] = {779.02728271484,-1160.3970947266,23.417623519897}, -- LV HOSPITAL } local Window_CarsForCr = guiCreateWindow(screX/2 - 100, screY/2 - 150, 200, 350, "Selecting Vehicles Menu", false) guiSetVisible(Window_CarsForCr, false) guiWindowSetSizable(Window_CarsForCr, false) local list_Cars = guiCreateGridList(0, 0.07, 1, 0.66, true, Window_CarsForCr) local column_cars = guiGridListAddColumn(list_Cars, "vehicle", 0.9) local selectBB = guiCreateButton(0.05, 0.75, 1, 0.1, "Select!", true, Window_CarsForCr) local closeBBB = guiCreateButton(0.05, 0.86, 1, 0.1, "Close", true, Window_CarsForCr) local list_Medic = guiCreateGridList(0, 0.07, 1, 0.66, true, Window_CarsForCr) guiSetVisible(list_Medic, false) local column_Medic = guiGridListAddColumn(list_Medic, "vehicle", 0.9) guiGridListSetItemText(list_Medic, guiGridListAddRow(list_Medic), column_Medic, "Ambulance", false, false) local medic1 = createMarker(1177, -1308, 12.95, "cylinder", 2, 0, 255, 255, 100) local medic2 = createMarker(1177, -1338.5, 12.95, "cylinder", 2, 0, 255, 255, 100) function onWaste() guiSetVisible(Window_CarsForCr, false) showCursor(false) setTimer(setElementFrozen, 50, 1, player, false) end addEventHandler("onClientPlayerWasted", player, onWaste) addEventHandler("onClientGUIClick", closeBBB, onWaste, false) for _,car in ipairs(vehicles) do local row = guiGridListAddRow(list_Cars) guiGridListSetItemText(list_Cars, row, column_cars, getVehicleNameFromModel(tonumber(car)), false, false) end for _, Pos in ipairs(MarkersPosition) do local marker = createMarker(Pos[1], Pos[2], Pos[3], "cylinder", 2, 200, 200, 200, 100) setElementID(marker, tostring(Pos[4])) MarkersTable[marker] = true end
  13. سوية لاني مافهمت انا ابي اذا معة الداتا ماتفتح لة اللوحة ولا يقدر يدخل الماركرات الي انا احددها فهمت
  14. بس وين احط اسم الماركر الي مابية يفتح
  15. السلام عليكم لو معة الحقيبة ماتفتح معة لوحة سيارات من ماركر function MarkersPosition ( player) if(getElementType(player) == "player")then getElementData( player, "bag_Holder" ) outputChatBox("لايمكن فتح لوحة سيارررات", player, 30, 171, 210) end end) غلط صح
  16. سويت اسم الداتا بس لاشريت السيارمايسحب فلوس
  17. ألمشكلة لا شريت مايسحب فلوس
  18. في مشكلة اقدر سحب سيارة بفلوس داتا بس ماقدر اشتري سيارة يقولي فلوس وهمية
  19. شكككرا جزيلأأ اخي ابا كريم يعمل اخي دابل كنت اريد الاموال شكرا لك
  20. لو اقولكم كم لي ولا اعرف ابرمج للحين تنصدموا ههه ماعرف ابرمج ولكن افهم كل كود هو لشو وطقطق خفيف يمكن فجاة اطلع محترف خخ المهم هي مالها دخل بالفترة هي تعتممد على فهمك ومخك في ناس تستوعب خلال ايام وناس اسابيع وناس شهور وناس سنين
  21. السلام عليكم كيفكم هذا كوود استخدمة ولكن الفلوس وهمية ابيها داتا لاهنتم حاولت شوية ماضبطت function getFreeID() local result = dbPoll(dbQuery(db, "SELECT ID FROM VehicleList ORDER BY ID ASC"), -1) newID = false for i, id in pairs (result) do if id["ID"] ~= i then newID = i break end end if newID then return newID else return #result + 1 end end function getVehicleByID(id) v = false for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "ID") == id then v = veh break end end return v end function updateVehicleInfo(player) if isElement(player) then local result = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(player))), -1) if type(result) == "table" then setElementData(player, "VehicleInfo", result) end end end addEventHandler("onResourceStart", resourceRoot, function() db = dbConnect("sqlite", "database.db") dbExec(db, "CREATE TABLE IF NOT EXISTS VehicleList (ID, Account, Model, X, Y, Z, RotZ, Colors, Upgrades, Paintjob, Cost, HP)") for i, player in ipairs(getElementsByType("player")) do updateVehicleInfo(player) end end) addEvent("onOpenGui", true) addEventHandler("onOpenGui", root, function() updateVehicleInfo(source) end) function destroyVehicle(theVehicle) if isElement(theVehicle) then local Owner = getElementData(theVehicle, "Owner") if Owner then local x, y, z = getElementPosition(theVehicle) local _, _, rz = getElementRotation(theVehicle) local r1, g1, b1, r2, g2, b2 = getVehicleColor(theVehicle, true) local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 upgrade = "" for _, upgradee in ipairs (getVehicleUpgrades(theVehicle)) do if upgrade == "" then upgrade = upgradee else upgrade = upgrade..","..upgradee end end local Paintjob = getVehiclePaintjob(theVehicle) or 3 local id = getElementData(theVehicle, "ID") dbExec(db, "UPDATE VehicleList SET X = ?, Y = ?, Z = ?, RotZ = ?, HP = ?, Colors = ?, Upgrades = ?, Paintjob = ? WHERE Account = ? AND ID = ?", x, y, z, rz, getElementHealth(theVehicle), color, upgrade, Paintjob, getAccountName(getPlayerAccount(Owner)), id) updateVehicleInfo(Owner) local attached = getAttachedElements(theVehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end end destroyElement(theVehicle) end end addEvent("onBuyNewVehicle", true) addEventHandler("onBuyNewVehicle", root, function(Model, cost, r1, g1, b1, r2, g2, b2) abc = false local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) for i, data in ipairs (data) do if data["Model"] == Model then abc = true break end end if #data >= 5 then outputChatBox("[G4A] نائسف احد الاقصا للسيارات هو [5] ", source, 38, 122, 216, true) return end if abc then outputChatBox("[G4A] هذه المركبه موجوده من قبل", source, 38, 122, 216, true) return end if getPlayerMoney(source) >= tonumber(cost) then takePlayerMoney ( source, cost ) local x, y, z = getElementPosition(source) local _, _, rz = getElementRotation(source) local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 vehicle = createVehicle(Model, x-5, y+5, z, 0, 0, rz) setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) setElementData(vehicle, "Owner", source) local NewID = getFreeID() setElementData(vehicle, "ID", NewID) dbExec(db, "INSERT INTO VehicleList VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", NewID, getAccountName(getPlayerAccount(source)), Model, x-5, y+5, z, rz, color, "", 3, cost, 1000) outputChatBox("[Vehicle System] #FFFF00انت اشتريت: #00FFFF"..getVehicleNameFromModel(Model), source, 38, 122, 216, true) outputChatBox("[Vehicle System] #FFFF00مبلغ: #00FF00$"..cost, source, 38, 122, 216, true) updateVehicleInfo(source) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 50, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) else outputChatBox("[G4A] ليس لديك فلوس ", source, 38, 122, 216, true) end end) vv = {} addEvent("SpawnMyVehicle", true) addEventHandler("SpawnMyVehicle", root, function(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then if getVehicleByID(id) then outputChatBox(" [G4A] #58FAF4 مركبتك ظاهره بالفعل !!", source, 38, 122, 216, true) else local color = split(data[1]["Colors"], ',') r1 = color[1] or 255 g1 = color[2] or 255 b1 = color[3] or 255 r2 = color[4] or 255 g2 = color[5] or 255 b2 = color[6] or 255 vehicle = createVehicle(data[1]["Model"], data[1]["X"], data[1]["Y"], data[1]["Z"], 0, 0, data[1]["RotZ"]) setElementData(vehicle, "ID", id) local upd = split(tostring(data[1]["Upgrades"]), ',') for i, upgrade in ipairs(upd) do addVehicleUpgrade(vehicle, upgrade) end local Paintjob = data[1]["Paintjob"] or 3 setVehiclePaintjob(vehicle, Paintjob) setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) if data[1]["HP"] <= 255.5 then data[1]["HP"] = 255 end setElementHealth(vehicle, data[1]["HP"]) setElementData(vehicle, "Owner", source) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 50, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) outputChatBox("[G4A] #58FAF4 تم اظهار مركبتك ", source, 38, 122, 216, true) end else outputChatBox("[G4A] قد تكون هذه مشكله كلم الادمن ", source, 38, 122, 216, true) end end) addEvent("DestroyMyVehicle", true) addEventHandler("DestroyMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then destroyVehicle(vehicle) outputChatBox ("[G4A] #58FAF4 تم اخفاء مركبتك ", source, 38, 122, 216, true) else outputChatBox("[G4A] اختر المركبه التي تريد اخفائها !! ", source, 38, 122, 216, true) end else outputChatBox("[G4A] هذه المركبه ليست ظاهرة", source, 38, 122, 216, true) end end) addEvent("LightsMyVehicle", true) addEventHandler("LightsMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then local Vehicle = getPedOccupiedVehicle(source) if Vehicle == vehicle then if getVehicleOverrideLights(vehicle) ~= 2 then setVehicleOverrideLights(vehicle, 2) outputChatBox("[G4A] #58FAF4 تم تشغيل النوار المركبة ", source, 38, 122, 216, true) elseif getVehicleOverrideLights(vehicle) ~= 1 then setVehicleOverrideLights(vehicle, 1) outputChatBox("[G4A] #58FAF4 تم اقاف تشغيل انلوار المركبة ", source, 38, 122, 216, true) end else outputChatBox("[G4A] #FF0000 انت لست بداخل المركبه ", source, 38, 122, 216, true) end else outputChatBox("[[G4A] #58FAF4 مركبتك ليست ظاهره ", source, 38, 122, 216, true) end end) addEvent("LockMyVehicle", true) addEventHandler("LockMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not isVehicleLocked(vehicle) then setVehicleLocked(vehicle, true) setVehicleDoorsUndamageable(vehicle, true) setVehicleDoorState(vehicle, 0, 0) setVehicleDoorState(vehicle, 1, 0) setVehicleDoorState(vehicle, 2, 0) setVehicleDoorState(vehicle, 3, 0) outputChatBox("[G4A] #58FAF4 تم اقفال المركبة ", source, 38, 122, 216, true) elseif isVehicleLocked(vehicle) then setVehicleLocked(vehicle, false) setVehicleDoorsUndamageable(vehicle, false) outputChatBox("[G4A] #58FAF4 تم فتح قفل مركبتك ", source, 38, 122, 216, true) end else outputChatBox("[G4A] #58FAF4 مركبتك ليست ظاهرة ", source, 38, 122, 216, true) end end) addEvent("BlipMyVehicle", true) addEventHandler("BlipMyVehicle", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if not getElementData(vehicle, "ABlip") then setElementData(vehicle, "ABlip", true) createBlipAttachedTo(vehicle, 41, 2, 255, 0, 0, 255, 0, 65535, source) outputChatBox("[G4A] #58FAF4 تم تحديد مكان مركبتك", source, 38, 122, 216, true) else local attached = getAttachedElements(vehicle) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end setElementData(vehicle, "ABlip", false) outputChatBox("[G4A] #58FAF4 تم الغاء تحديد مكان مركبتك ", source, 38, 122, 216, true) end else outputChatBox("[G4A]#58FAF4 سيارتك ليست ظاهره ", source, 38, 122, 216, true) end end) addEvent("FixMyVehicle", true) addEventHandler("FixMyVehicle", root, function(id) if getElementData(source, "Oil") >= tonumber(20) then setElementData(source, "Oil", (getElementData(source, "Oil") or 0) - 20) local vehicle = getVehicleByID(id) if isElement(vehicle) then fixVehicle(vehicle) setVehicleEngineState(vehicle, true) if isVehicleDamageProof(vehicle) then setVehicleDamageProof(vehicle, false) end end dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND ID = ?", 1000, getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) outputChatBox ("[G4A] #58FAF4 تتم اصلاح المركبة بنجاح", source, 38, 122, 216, true) else outputChatBox("[G4A] #FF0000 ليس لديك النفط الكافي", source, 38, 122, 216, true) end end) addEvent("WarpMyVehicle", true) addEventHandler("WarpMyVehicle", root, function(id) if not isPedInVehicle (source) then if getElementInterior(source) == 0 then if getPlayerMoney(source) >= tonumber(5000) then local vehicle = getVehicleByID(id) if isElement(vehicle) then takePlayerMoney ( source, 5000 ) local x, y, z = getElementPosition(source) setElementPosition(vehicle, x+3, y+2, z+1.5) outputChatBox ("[G4A] #58FAF4 تم سحب المركبة ", source, 38, 122, 216, true) else outputChatBox("[G4A] #58FAF4 المركبة ليست ظاهرة ", source, 38, 122, 216, true) end else outputChatBox("[G4A] #FF0000 لا يوجد مال لسحبها ", source, 38, 122, 216, true) end else outputChatBox("[G4A]#FF0000 انت بداخل المركبة لا يمكن سحبها !!! ", source, 38, 122, 216, true) end else outputChatBox("[G4A] #FF0000 لا تسطتطيع سحب المركبة اخرج منها ", source, 38, 122, 216, true) end end) addEvent("SellMyVehicle", true) addEventHandler("SellMyVehicle", root, function(id) local vehicle = getVehicleByID(id) local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1) if type(data) == "table" and #data ~= 0 then local Money = math.ceil((data[1]["Cost"]*.9)*math.floor(data[1]["HP"])/100/10) givePlayerMoney (source, Money) if isElement(vehicle) then destroyElement(vehicle) end dbExec(db, "DELETE FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id) updateVehicleInfo(source) outputChatBox(" #00FF00 تم بيع السياره بسعر $"..Money, source, 38, 122, 216, true) end end) function getDataOnLogin(_, account) updateVehicleInfo(source) end addEventHandler("onPlayerLogin", root, getDataOnLogin) function SaveVehicleDataOnQuit() for i, veh in ipairs (getElementsByType("vehicle")) do if getElementData(veh, "Owner") == source then destroyVehicle(veh) end end end addEventHandler("onPlayerQuit", root,SaveVehicleDataOnQuit)
  22. local Anims = {"DAN_UP_A", "dnce_M_b", "DAN_Left_A", "DAN_Down_A", "DAN_Loop_A", "dance_loop"} x, y = guiGetScreenSize() font="default-bold" fontTam=5 spcGam=dxGetTextWidth ("GTA",fontTam,font) -- اسم سيرفرك بالنجليزي function intro() ahora = getTickCount() count=ahora-start dxDrawImage(0, 0, x, y, 'fondo.png',0,0,0,tocolor(255,255,255),false) sizeX=64*1.21 sizeY=64*1.21 varX,varY,varZ = anim(start,1000,spcGam,0,0,0,spcGam,150,"OutBack") dxDrawText("War-streets",0+x/2-varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(38,205,0,255),fontTam,font,nil,nil,true) ---- اسم سيرفرك dxDrawText("",1+x/-varY/6-dxGetTextWidth ("i",fontTam,font),y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true) dxDrawText("♥",x/2+varY/2,y/2-100,varY+x/2-varY/2,y,tocolor(255,255,255,255),fontTam,font,nil,nil,false,false,false,true) if (count>1500) then varX2,varY2,varZ2 = anim(start+1500,1000,0,0,0,200,250,360,"OutBack") dxDrawText("اهلا و سهلا بكم في سيرفر حرب العصابات",0+x/2-varY/2,y/2-100+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("حرب الشرطة والعصابات",0+x/2-varY/2,y/2-80+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) ---- اسم سيرفرك dxDrawText("Welcome to sever War streets ..",0+x/2-varY/2,y/2-60+dxGetFontHeight(fontTam,font),varY+x/2-varY/2,y,tocolor(255,255,255,varX2),1.5,font,"center",nil,false,false,false,true) end if (count>2000) then varX2,varY3,varZ3 = anim(start+2000,1000*10,0,0,0,200,250,360*5,"Linear") dxDrawImage ( x/2-sizeX/2, y/2+50, sizeX, sizeY, 'img/cargando2.png',180+varZ3) dxDrawText("Loading..",12,y/2+60+sizeY+1,x,y,tocolor(0,0,0,85),1.5,font,"center",nil,false,false,false,true) dxDrawText("Loading..",10,y/2+60+sizeY,x,y,tocolor(255,255,255,255),1.5,font,"center",nil,false,false,false,true) end end function anim(tag,animTime,de1,de2,de3,hasta1,hasta2,hasta3,typeAnim) local now = getTickCount() local endTime = tag + animTime local elapsedTime = now - tag local duration = endTime - tag local progress = elapsedTime / duration local a, b, c = interpolateBetween ( de1,de2,de3,hasta1,hasta2,hasta3, progress, typeAnim) return a, b, c end fileDelete("intro_c.lua") local sx, sy = guiGetScreenSize() alpha = 250 MP = "files/1.png" MX = sx MY = sy function adjIntro(adj) _, times = getTimerDetails(IntroTimer) if adj == "M1" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else IntroTimer = setTimer(adjIntro, 50, 26, "M2") end end, 50, 26) end elseif adj == "M2" then if (alpha < 250) and (alpha >= 0) then alpha = alpha + 10 end MX = (MX/0.95)-5 MY = (MY/0.95) MP = "files/2.png" if times == 1 then setTimer(function() MP = "files/3.png" setTimer(function() IntroTimer = setTimer(adjIntro, 50, 26, "M3") end, 3500, 1) end, 4000, 1) end elseif adj == "M3" then MX = (MX*0.95)+5 MY = (MY*0.95) if times == 1 then MP = "files/4.png" MX = (MX/0.95)-5 MY = (MY/0.95) setTimer(function() setTimer(function() if (alpha <= 250) and not (alpha <= 0) then alpha = alpha - 10 else removeEventHandler("onClientRender", root, drawIntro) fadeCamera(true, 6, 0, 0, 0) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) showCursor(true) guiSetVisible(GUIEditor.window[1], true) destroyElement(IntroSong) end end, 50, 26) end, 3500, 1) end end end function drawIntro() dxDrawImage(sx/2-(MX/2), sy/2-(MY/2), MX, MY, MP, 0, 0, 0, tocolor(255, 255, 255, alpha)) end function main() fadeCamera(false, 0) showChat(false) IntroSong = playSound("files/Intro.mp3") showPlayerHudComponent("all", false) start = getTickCount() addEventHandler("onClientRender",getRootElement(),intro) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),intro) IntroTimer = setTimer(adjIntro, 50, 26, "M1") addEventHandler("onClientRender", root, drawIntro) triggerEvent("onFinishIntro",getRootElement()) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) end, 5000, 1 ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main) GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(sx/2-(601/2), sy/2-(344/2), 601, 344, "", false) guiSetVisible(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetInputMode("no_binds_when_editing") GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 21, 579, 313, false, GUIEditor.window[1]) -----------------------------|Login|----------------------------- GUIEditor.tab[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) local MainText = xmlNodeGetValue(xmlLoadFile("Main.xml")) or "" GUIEditor.memo[1] = guiCreateMemo(7, 8, 271, 270, MainText, false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.label[1] = guiCreateLabel(395, 28, 65, 18, "UserName", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(322, 50, 210, 30, "", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(395, 107, 65, 18, "Password", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") GUIEditor.edit[2] = guiCreateEdit(322, 130, 210, 30, "", false, GUIEditor.tab[1]) guiEditSetMasked(GUIEditor.edit[2], true) GUIEditor.button[1] = guiCreateButton(313, 207, 235, 34, "Login", false, GUIEditor.tab[1]) -----------------------------|Register|----------------------------- GUIEditor.tab[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.label[3] = guiCreateLabel(273, 26, 60, 19, "UserName", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[3], "default-bold-small") GUIEditor.edit[3] = guiCreateEdit(198, 49, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.label[4] = guiCreateLabel(273, 90, 60, 19, "Password", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[4], "default-bold-small") GUIEditor.edit[4] = guiCreateEdit(198, 119, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.label[5] = guiCreateLabel(256, 162, 107, 16, "Confirm Password", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.edit[5] = guiCreateEdit(198, 188, 212, 27, "", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(153, 233, 312, 36, "Register", false, GUIEditor.tab[2]) -----------------------------|Rules|----------------------------- GUIEditor.tab[3] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) local RulesText = xmlNodeGetValue(xmlLoadFile("Rules.xml")) or "" GUIEditor.memo[2] = guiCreateMemo(10, 8, 559, 271, RulesText, false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[2], true) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local userName = guiGetText(GUIEditor.edit[1]) local passWord = guiGetText(GUIEditor.edit[2]) if userName ~= "" and passWord ~= "" then triggerServerEvent("Login-Register", localPlayer, "Login", userName, passWord) guiSetEnabled(GUIEditor.button[1], false) setTimer(function() guiSetEnabled(GUIEditor.button[1], true) end, 3000, 1) end elseif source == GUIEditor.button[2] then local userName = guiGetText(GUIEditor.edit[3]) local passWord1 = guiGetText(GUIEditor.edit[4]) local passWord2 = guiGetText(GUIEditor.edit[5]) if userName ~= "" and passWord1 ~= "" and passWord2 ~= "" then if #passWord1 < 4 then outputChatBox("The Password should be at least 4 characters long.", 255, 100, 0) elseif passWord1 ~= passWord2 then outputChatBox("The password does not match.", 255, 0, 0) else guiSetEnabled(GUIEditor.button[2], false) setTimer(function() guiSetEnabled(GUIEditor.button[2], true) end, 3000, 1) triggerServerEvent("Login-Register", localPlayer, "Register", userName, passWord1) end end end end) addEvent("onLoginSuccess", true) addEventHandler("onLoginSuccess", root, function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) local ped = createPed ( 0,737.40912 ,-1276.15332 ,13.554, 90) setPedAnimation( ped, "ped", "WALK_civi") local cam = setCameraMatrix ( 739.41571044922, -1276.4376220703, 13.415299797058, 738.42529296875, -1276.4196777344, 13.378232955933 ) setElementDimension( localPlayer, 20 ) setElementDimension( ped, 20 ) setTimer (function () setPedAnimation(ped,false) end, 6500, 1) setTimer (function () skinCount = 0 sPed = createPed(105, -2682.7624511719,1148.40100 ,19.59490) addEventHandler("onClientPedDamage",sPed,cancelEvent) sRight() bindKey("arrow_l", "down", sLeft) bindKey("arrow_r", "down", sRight) bindKey("enter", "down", EnterSpawn) addEventHandler("onClientPreRender", root, drawTeamName) destroyElement( ped ) setElementDimension( localPlayer, 0 ) setTime( 12, 0 ) end, 7000, 1) end) local skinTable = { -- skinID, team -- {105, "Grove"}, {106, "Grove"}, {107, "Grove"}, {108, "Vagos"}, {109, "Vagos"}, {110, "Vagos"}, {102, "Ballas"}, {103, "Ballas"}, {104, "Ballas"}, {114, "Aztecas"}, {115, "Aztecas"}, {116, "Aztecas"},{173, "Aztecas"}, {175, "Aztecas"}, {125, "Mafia"}, {126, "Mafia"}, {127, "Mafia"}, {111, "Russians"}, {112, "Russians"}, {113, "Russians"}, {122, "Russians"}, {163, "Triads"}, {164, "Triads"}, {165, "Triads"}, {166, "Triads"}, {158, "Rifa"}, {159, "Rifa"}, {160, "Rifa"}, {161, "Rifa"}, {162, "Rifa"}, {117, "Street"}, {118, "Street"}, {120, "Street"}, {121, "Street"}, {274, "Medic"}, {275, "Medic"}, {276, "Medic"}, {280, "Police"},{281, "Police"}, {282, "Police"}, {283, "Police"}, {284, "Police"}, {286, "Police"}, {288, "Police"}, {206,"No Team"},{202, "No Team"}, {133, "No Team"}, {128, "No Team"}, {189, "No Team"}, {189, "No Team"}, {68, "No Team"},{70, "No Team"}, {80, "No Team"}, {241, "No Team"}, {242, "No Team"}, {252, "No Team"}, {0, "No Team"},{96, "No Team"}, {14, "No Team"}, {19, "No Team"}, {43, "No Team"}, {176, "No Team"}, {292,"No Team"},{293, "No Team"}, {28, "No Team"}, {29, "No Team"}, {200, "No Team"}, {278, "No Team"}, {73, "No Team"},{203, "No Team"}, {50, "No Team"}, {155, "No Team"}, {137, "No Team"}, {235, "No Team"}, {33, "No Team"},{59, "No Team"}, {185, "No Team"}, {264, "No Team"}, {156, "No Team"}, {230, "No Team"}, {234,"No Team"},{253, "No Team"}, {236, "No Team"}, {239, "No Team"}, {240, "No Team"}, {247, "No Team"}, {261,"No Team"},{259, "No Team"}, {183, "No Team"}, {184, "No Team"}, {26, "No Team"}, {7 , "No Team"}, {16, "No Team"}, {0, "No Team"}, } setTimer( function() local x,y,z = getElementRotation(sPed) setElementRotation(sPed,x,y,z-5)end,50,0) setElementFrozen(sPed, true) function adjSelectionSetting(team) if team == "Grove" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Vagos" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Ballas" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Mafia" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Russians" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Triads" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Street" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Rifa" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Aztecas" then -- setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Medic" then setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "Police" then setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) updateSetting(team) elseif team == "No Team" then setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setElementPosition(sPed, -2816.92432,1148.40100 ,19.59490) updateSetting(team) end end function updateSetting(team) if team == "Aztecas" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = 338.4, -1344.52, 14, 270 elseif rand == 2 then sX, sY, sZ, sR = 338.4, -1354.52, 14, 507 elseif rand == 3 then sX, sY, sZ, sR = 351.4, -1362.52, 14, 423 end elseif team == "Rifa" then local rand = math.random(1, 2) if rand == 1 then sX, sY, sZ, sR = -2500 ,1072 ,57 ,180 elseif rand == 2 then sX, sY, sZ, sR = -2483 ,1055 ,61 ,180 end elseif team == "Street" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = -1749.3, 865.6, 25.74, 180 elseif rand == 2 then sX, sY, sZ, sR = -1730.3, 862.6, 24.74, 180 elseif rand == 3 then sX, sY, sZ, sR = -1775.3, 860.6, 24.74, 180 end elseif team == "Triads" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = 2394.75391,1941.82422,12 , 270 elseif rand == 2 then sX, sY, sZ, sR = 2444.26904,1941.67981,11 , 270 elseif rand == 3 then sX, sY, sZ, sR = 2483.46411,1941.32874,10 , 270 end elseif team == "Russians" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = 1970.4, 1623.4, 12.87, 270 elseif rand == 2 then sX, sY, sZ, sR = 1975.4, 1620.4, 12.87, 270 elseif rand == 3 then sX, sY, sZ, sR = 1992.4, 1625.4, 12.87, 270 end elseif team == "Mafia" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = 952.85, -915.8, 45.4, 180 elseif rand == 2 then sX, sY, sZ, sR = 971.85, -920.8, 45.4, 180 elseif rand == 3 then sX, sY, sZ, sR = 959.85, -897.8, 45.4, 180 end elseif team == "Ballas" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = 398.9, -1798.6, 7.8, 0 elseif rand == 2 then sX, sY, sZ, sR = 425.9, -1814.6, 6.8, 0 elseif rand == 3 then sX, sY, sZ, sR = 437.9, -1796.6, 5.8, 0 end elseif team == "Vagos" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = 2421.35, -1224, 25.25, 180 elseif rand == 2 then sX, sY, sZ, sR = 2438.35, -1225, 24.25, 180 elseif rand == 3 then sX, sY, sZ, sR = 2403.35, -1223, 25.25, 180 end elseif team == "Grove" then local rand = math.random(1, 3) if rand == 1 then sX, sY, sZ, sR = 2511.7, -1651.8, 13.9, 140 elseif rand == 2 then sX, sY, sZ, sR = 2495.7, -1686.8, 13.9, 140 elseif rand == 3 then sX, sY, sZ, sR = 2486.7, -1651.8, 13.9, 140 end elseif team == "Medic" then local rand = math.random(1, 2) if rand == 1 then sX, sY, sZ, sR = 1183.28, -1333, 13.6, 270 elseif rand == 2 then sX, sY, sZ, sR = 2029, -1419.2, 17, 270 end elseif team == "Police" then local rand = math.random(1, 4) if rand == 1 then sX, sY, sZ, sR = 1567.99, -1692.43, 5.9, 180 elseif rand == 2 then sX, sY, sZ, sR = 1585.2, -1677.7, 5.9, 270 elseif rand == 3 then sX, sY, sZ, sR = 1580.2,-1635.454, 13.56, 90 elseif rand == 4 then sX, sY, sZ, sR = 1552.753, -1675.37, 16.2, 90 end elseif team == "No Team" then local rand = math.random(1, 14) if rand == 1 then sX, sY, sZ, sR = 958.14, -1388.65, 13.4, 180 elseif rand == 2 then sX, sY, sZ, sR = 914.95, -930.72, 42.601, 180 elseif rand == 3 then sX, sY, sZ, sR = 1554.73, -1095.34, 25.1, 300 elseif rand == 4 then sX, sY, sZ, sR = 2097.8, -1368.8, 24, 180 elseif rand == 5 then sX, sY, sZ, sR = 2422.7, -1229.55, 24.9, 180 elseif rand == 6 then sX, sY, sZ, sR = 2864.37, -1365.63, 11, 270 elseif rand == 7 then sX, sY, sZ, sR = 2457.4, -2109.44, 13.55, 0 elseif rand == 8 then sX, sY, sZ, sR = 1754.91, -2064.52, 13.61, 170 elseif rand == 9 then sX, sY, sZ, sR = 1568, -1893.6, 13.56, 0 elseif rand == 10 then sX, sY, sZ, sR = 331.35, -1518.6, 35.87, 230 elseif rand == 11 then sX, sY, sZ, sR = 911.35, -1251.6, 15.87, 230 elseif rand == 12 then sX, sY, sZ, sR = 1530.35, -800.6, 72.87, 230 elseif rand == 13 then sX, sY, sZ, sR = 2029.35, -961.6, 40.87, 230 elseif rand == 14 then sX, sY, sZ, sR = 1877.35, -1376.6, 13.87, 230 elseif rand == 15 then sX, sY, sZ, sR = 1990.35, -1374.6, 23.87, 230 elseif rand == 16 then sX, sY, sZ, sR = 2794, -1945.6, 13.87, 230 elseif rand == 17 then sX, sY, sZ, sR = 1608, -1254.6, 17.87, 230 end end end function sRight() skinCount = skinCount + 1 playSoundFrontEnd(6) createExplosion (-2816.92432,1148.40100 ,19.5, 12 ) if skinCount > #skinTable then skinCount = 1 end skinID, team = unpack(skinTable[skinCount]) adjSelectionSetting(team) setElementModel(sPed, skinID) end function sLeft() skinCount = skinCount - 1 playSoundFrontEnd(14) createExplosion (-2816.92432,1148.40100 ,19.5, 12 ) if skinCount < 1 then skinCount = #skinTable end skinID, team = unpack(skinTable[skinCount]) adjSelectionSetting(team) setElementModel(sPed, skinID) end function EnterSpawn() if (team == "Police") then local wL = getElementData(localPlayer, "WantLvl") or 0 local LegalStatus = getElementData(localPlayer, "LegalStatus") if wL > 0 then exports.TopBarChat:sendClientMessage("You can't join police when you have stars!", 255, 0, 0) return elseif LegalStatus == "Jailed" then exports.TopBarChat:sendClientMessage("You can't join police when you are jailed!", 255, 0, 0) return end end unbindKey("arrow_l", "down", sLeft) unbindKey("arrow_r", "down", sRight) unbindKey("enter", "down", EnterSpawn) showPlayerHudComponent("all", true) removeEventHandler("onClientPreRender", root, drawTeamName) destroyElement(sPed) triggerServerEvent("spawnMe", localPlayer, skinID, sX, sY, sZ, sR, team) end chgTeamOnDeath = false addEventHandler("onClientPlayerWasted", localPlayer, function() updateSetting(team) setTimer(function() triggerServerEvent("spawnMe", localPlayer, skinID, sX, sY, sZ, sR, team) end, 900, 1) if chgTeamOnDeath then setTimer(function() guiSetVisible(GUIEditor.window[1], false) showCursor(false) if not isElement(sPed) then sPed = createPed(105, 2495.20093, -1687.96082, 13.51605) addEventHandler("onClientPedDamage",sPed,cancelEvent) end bindKey("arrow_l", "down", sLeft) bindKey("arrow_r", "down", sRight) bindKey("enter", "down", EnterSpawn) setCameraMatrix(-2814.688,1152.8944091797,21.36700668305,-2815.7495117188,1150.90029297,21) setPedAnimation(sPed, "DANCING", Anims[math.random(1, 6)]) setElementInterior ( getLocalPlayer() , 0 ) setElementDimension ( getLocalPlayer() , 0 ) addEventHandler("onClientPreRender", root, drawTeamName) showPlayerHudComponent("all", false) chgTeamOnDeath = false end, 2050, 1) end end) bindKey("F4", "down", function() if not chgTeamOnDeath then exports.TopBarChat:sendClientMessage("You will be able to change your team and skin when you die.", 0, 255, 255) chgTeamOnDeath = true else exports.TopBarChat:sendClientMessage("Changing team and skin cancelled.", 255, 0, 0) chgTeamOnDeath = false end end) function drawTeamName() setElementPosition(localPlayer, 0, 0, 0) if sPed and team then local teamElement = getTeamFromName(team) if teamElement then local r, g, b = getTeamColor(teamElement) local x, y, z = getPedBonePosition(sPed, 4) local sx, sy = getScreenFromWorldPosition(x, y, z+0.9) if sx and sy then dxDrawText(team, sx + 1, sy + 1, sx + 1, sy + 3, tocolor(0, 0, 0, 255), 1.3, "bankgothic", "center") dxDrawText(team, sx + 1, sy - 1, sx - 1, sy + 3, tocolor(0, 0, 0, 255), 1.3, "bankgothic", "center") dxDrawText(team, sx - 1, sy - 1, sx - 1, sy - 3, tocolor(0, 0, 0, 255), 1.3, "bankgothic", "center") dxDrawText(team, sx, sy, sx, sy, tocolor(r, g, b, 255), 1.3, "bankgothic", "center") end end end end -----------------------------------|Medic|----------------------------------- addEventHandler("onClientPlayerDamage", localPlayer, function(healer, weapon) if healer and getElementType(healer) == "player" then local team = getPlayerTeam(healer) local teamName = team and getTeamName(team) or false local Health = getElementHealth(source) if (teamName == "Medic") and (weapon == 41) then cancelEvent() if (Health < 99) then triggerServerEvent("healP", localPlayer, healer) end end end end) -----------------------------------|Medic|----------------------------------- setTeamFriendlyFire(createTeam("Grove", 0, 500, 0 ), false) setTeamFriendlyFire(createTeam("Vagos", 255, 200, 0 ), false) setTeamFriendlyFire(createTeam("Ballas", 128, 0, 128), false) setTeamFriendlyFire(createTeam("Mafia", 154,205,50 ), false) setTeamFriendlyFire(createTeam("Russians", 160,82,45), false) setTeamFriendlyFire(createTeam("Triads", 104,104,104), false) setTeamFriendlyFire(createTeam("Rifa", 250,128,114 ), false) setTeamFriendlyFire(createTeam("Street", 250,128,0 ), false) setTeamFriendlyFire(createTeam("Aztecas", 24, 198, 238), false) setTeamFriendlyFire(createTeam("Medic", 24, 255, 255 ), false) setTeamFriendlyFire(createTeam("Police", 0, 0, 255 ), false) setTeamFriendlyFire(createTeam("No Team", 155, 0, 255 ), false) addEvent("spawnMe", true) addEventHandler("spawnMe", root, function(skinID, sX, sY, sZ, sR, team) local team = getTeamFromName(team) spawnPlayer(source, sX, sY, sZ, sR, skinID, 0, 0, team) setCameraTarget(source) showChat(source, true) end) addEventHandler("onPlayerSpawn", root, function(_, _, _, _, team) local team = team and getTeamName(team) or "N/A" if team == "Police" then giveWeapon(source, 3, 1) takeWeapon(source, 41) elseif team == "Medic" then giveWeapon(source, 41, 9999) takeWeapon(source, 3) else takeWeapon(source, 3) takeWeapon(source, 41) end local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local wData = getAccountData(account, "newPlayerData") if not wData then givePlayerMoney(source, 2500) giveWeapon(source, 23, 20) giveWeapon(source, 31, 50) setAccountData(account, "newPlayerData", true) end end end) addEvent("Login-Register", true) addEventHandler("Login-Register", root, function(action, userName, passWord) if (action == "Login") then local account = getAccount(userName, passWord) if account then logIn(source, account, passWord) triggerClientEvent(source, "onLoginSuccess", source) else exports.TopBarChat:sendClientMessage ("Wrong username or password!", source, 255, 255, 0) end elseif (action == "Register") then local serial = getPlayerSerial(source) local TotalAcc = TotalAccounts(serial) or 0 if TotalAcc < 3 then if not getAccount(userName) then local accountAdded = addAccount(userName, passWord) if accountAdded then exports.TopBarChat:sendClientMessage("You have successfully registered!, you can now login with your username and password.", source, 0, 255, 50) setAccountData(accountAdded, "reg-Serial", serial) else exports.TopBarChat:sendClientMessage("Error creating account, please contact the admin.", source, 255, 0, 50) end else exports.TopBarChat:sendClientMessage("Account with this name already exists!", source, 255, 0, 0) end else exports.TopBarChat:sendClientMessage("You can register up to 3 accounts only!", source, 255, 0, 0) end end end) function TotalAccounts(serial) aCount = 0 for i, account in ipairs(getAccounts()) do local accSerial = getAccountData(account, "reg-Serial") if accSerial and accSerial == serial then aCount = aCount + 1 end end return aCount end -----------------------------------|Medic|----------------------------------- addEvent("healP", true ) addEventHandler("healP", root, function(healer) local Health = getElementHealth(source) if (Health < 99) then local hp = 2*Health if getPlayerMoney(source) >= hp then setElementHealth(source, Health+15) givePlayerMoney(healer, hp) takePlayerMoney(source, hp) exports.TopBarChat:sendClientMessage("You earned $"..hp, healer, 0, 255, 0) end end end) -----------------------------------|Medic|----------------------------------- هذة كلنت وسيرفر اتمنى القة حل
  23. ينفع تسوو تايمر لسلاح يمكن يززبط الي يسساعدني لة بووسة
×
×
  • Create New...