Jump to content

#DRAGON!FIRE

Members
  • Posts

    4,429
  • Joined

  • Last visited

Everything posted by #DRAGON!FIRE

  1. تابل للديث ماتش .. واحيانا ادخل الهجولة كان حماس ولله
  2. سورس او كلنت مالها دخل بكل بساطة ما يضبط لان الداتا مو موجودة او لا تطابق الشرط حقكـ جرب بـ زر محدد تشيل كل تحققات الداتا وجرب .
  3. حياك الله حبيبي تحط كذا : return outputChatBox ( "[Gta-AW] Login First "..getPlayerName ( source ).. " To Type In Chat ", source, 255, 255, 0, true )
  4. جرب : --***********************************-- --***********************************-- -- --***********************************-- --***********************************-- -- outputDebugString("Gta Arab Way Chat System | Started") -- rRoot = getResourceRootElement(getThisResource()) -- ANTI_FLOOD = true -- Enable anti flood ?. ANTI_REPEAT = true -- Enable anti repeat ?. ANTI_FLOOD_TIME = 5 * 1000 -- Anti flood time in miliseconds . MUTE_PLAYERS = true -- Mute players if they flooded too much ? . MAX_FLOOD_TIMES = 10 -- Max flood times. MUTE_TIME = 10 * 60 * 1000 -- Time to mute player if he flooded too much. ADMIN_SOUND = 1 -- Play sound if admin talked ( set to false to disable ) . -- lastChatMessage = {} chatTime = {} chatTimers = {} floodTimes = {} muteTimers = {} -- TAGS = { -- Tag Group | Tag | Tag Message Color | Anti Flood for Group | Play sound on talk | Anti flood time {"Console", "#FF0000* #f3f781[Manager]","#81bef7",false,true}, {"Leader", "#FF0000* #FF0033[Head Admin]","#FFFA54",true,false,9*1000}, {"Big-Admin", "#FF0000* #FF0033[HeadAdmin]","#FFFA54",true,false,9*1000}, {"Msabah", "#FF0000* #00C4FF[OwnerTs3]","#FFFA54",true,false,9*1000}, {"Admin", "#FF0000* #DC143C[Admin]","#FFFA54",true,false,9*1000}, {"VIP", "#FF0000* #FFCD00[VIP]","#FFFA54",true,false,6*1000}, {"Support", "#FF0000* #ff00ff[support]","#FFFA54",true,false,6*1000}, {"LVL1", "#FF0000* #A5A5A5[Arab|1|Com]","#FFFA54",true,false,9*1000}, {"LVL2", "#FF0000* #A5A5A5[Arab|2|Com]","#FFFA54",true,false,9*1000}, {"LVL3", "#FF0000* #A5A5A5[Arab|3|Com]","#FFFA54",true,false,9*1000}, {"LVL4", "#FF0000* #A5A5A5[Arab|4|Com]","#FFFA54",true,false,9*1000}, {"LVL5", "#FF0000* #A5A5A5[Arab|5|Com]","#FFFA54",true,false,9*1000} } -- function logMessage(text,player) if text and player then text = string.gsub(text, '#%x%x%x%x%x%x', '') local log = fileOpen("ChatLog.log") or fileCreate("ChatLog.log") -- if log then fileSetPos(log,fileGetSize(log)) fileWrite(log,"\r\n",text) fileFlush(log) fileClose(log) end end end -- function isInGroup(p,Group) if p and Group then local pAcc = getPlayerAccount(p) if pAcc and isGuestAccount(pAcc) ~= true then -- local g = aclGetGroup (tostring(Group)) if not g then return false end -- local pAccName = getAccountName(pAcc) if isObjectInACLGroup ("user."..pAccName,g) then return true else return false end -- else return false end end end -- function getFixedName(player) if isElement(player) then local hisName = getPlayerName(player) if hisName then result = string.gsub(hisName, '#%x%x%x%x%x%x', '') if result then return result end end else outputDebugString("ERROR : Bad Player at getFixedName !") end end -- function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end -- addEvent("onPlayerChat",true) addEventHandler("onPlayerChat",root,function ( Text,msgtype ) if ( isGuestAccount ( getPlayerAccount ( source ) ) ) then cancelEvent() return outputChatBox ( "[Gta-AW] Login First !!", source, 255, 255, 0, true ) end cancelEvent() if ANTI_FLOOD then if getElementData(source,"TagFlood") == true or getElementData(source,"TagFlood") == nil or tonumber(getElementData(source,"TagFlood")) then if chatTime[source] then if MUTE_PLAYERS then if tonumber(floodTimes[source]) >= tonumber(MAX_FLOOD_TIMES) then mutePlr(source,msgtype) return end end local time,_,__ = getTimerDetails(chatTimers[source]) outputChatBox("Stop spamming chat!, wait "..math.floor(time/1000,2).." seconds.", source, 255, 0, 0) floodTimes[source] = tonumber(floodTimes[source]) + 1 cancelEvent() return end if ANTI_REPEAT and lastChatMessage[source] and lastChatMessage[source] == Text then outputChatBox("Stop repeating yourself!", source, 255, 0, 0) cancelEvent() return else lastChatMessage[source] = Text end end end msgTag = nil for k,v in ipairs ( TAGS ) do if not msgTag then local Group,Tag,Color,Flood = v[1],v[2],v[3],v[4] if isInGroup(source,Group) then msgTag = Tag msgColor = v[3] msgFlood = v[4] msgSound = v[5] msgFloodTime = v[6] setElementData(source,"TagFlood",msgFlood) setElementData(source,"TagSound",msgSound) setElementData(source,"TagFloodTime",msgFloodTime) end r,g,b = getPlayerNametagColor(source) hex = RGBToHex(r,g,b) or "#FFFFFF" end end --- local time = getRealTime() local second,minute,hour,day,month,year = time.second,time.minute,time.hour,time.monthday ,time.month + 1,time.year + 1900 if hour <= 0 then x = "AM" else x = "PM" end hour = math.floor(hour / 12) if hour == 0 then hour = "12" end -- chatTime[source] = true floodTimes[source] = 0 if getElementData(source,"TagFloodTime") then t = getElementData(source,"TagFloodTime") else t = ANTI_FLOOD_TIME end chatTimers[source] = setTimer(function(p) chatTime[p] = nil chatTimers[p] = nil end , t , 1 ,source) -- if msgtype == 0 then if msgTag then outputChatBox( ""..msgTag.." "..hex..""..getFixedName(source).." "..msgColor..": "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",root,255,0,0,true) logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] "..msgTag.." [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) if ADMIN_SOUND ~= false then if getElementData(source,"TagSound") == true then playSoundFrontEnd(root,tonumber(ADMIN_SOUND)) end end else setElementData(source,"TagFlood",true) setElementData(source,"TagSound",false) setElementData(source,"TagFloodTime",nil) outputChatBox( ""..hex..""..getFixedName(source).." #FFFFFF: "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",root,255,255,255,true) logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) end elseif msgtype == 2 then for k,v in ipairs ( getElementsByType("player") ) do if getPlayerTeam(v) == getPlayerTeam(source) then if msgTag then outputChatBox( "(Team) "..msgTag.." "..hex..""..getFixedName(source).." "..msgColor..": "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",v,255,0,0,true) if ADMIN_SOUND ~= false then if getElementData(source,"TagSound") == true then playSoundFrontEnd(v,tonumber(ADMIN_SOUND)) end end else setElementData(source,"TagFlood",true) setElementData(source,"TagFloodTime",nil) setElementData(source,"TagSound",false) outputChatBox( "(Team) "..hex..""..getFixedName(source).." #FFFFFF: "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",v,255,255,255,true) end end end if msgTag then logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] ("..getTeamName(getPlayerTeam(source))..") "..msgTag.." [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) else logMessage( "["..math.floor(hour)..":"..minute..":"..second..""..tostring(x).." "..day.."/"..month.."/"..year.."] ("..getTeamName(getPlayerTeam(source))..") [ "..getFixedName(source).." ] : "..string.gsub(Text, '#%x%x%x%x%x%x', '').."",source) end end end ) function mutePlr(p,t) if p then if isPlayerMuted(p) ~= true then if t == 0 then x = "main" elseif t == 2 then x = "team" end setPlayerMuted(p,true) outputChatBox("* (ANTI FLOOD) #FFFFFF"..string.gsub(getPlayerName(p), '#%x%x%x%x%x%x', '').." #FF0000have been muted for "..math.floor(MUTE_TIME/1000/60).." minutes for flooding "..x.." chat.",root,255,0,0,true) muteTimers[p] = setTimer ( function ( p ) setPlayerMuted(p,false) outputChatBox("You have been unmuted, please don't flood the chat again !",p,255,0,0,true) end , MUTE_TIME , 1 ,p ) end end end --[[ serialMute = {} addEventHandler("onPlayerQuit",root,function() if muteTimers[source] then local serial = getPlayerSerial(source) local time = getTimerDetails(muteTimers[source]) serialMute[serial] = time killTimer(muteTimers[source]) end -- lastChatMessage[source] = nil chatTime[source] = nil chatTimers[source] = nil floodTimes[source] = nil muteTimers[source] = nil end ) addEventHandler("onPlayerJoin",root,function() local serial = getPlayerSerial(source) if serialMute[serial] then setPlayerMuted(source,true) outputChatBox("* (ANTI FLOOD) You have been muted for "..math.floor(serialMute[serial]/1000/60).." minutes for flooding.",source,255,0,0,true) muteTimers[p] = setTimer ( function ( source ) setPlayerMuted(p,false) outputChatBox("You have been unmuted, please don't flood the chat again !",p,255,0,0,true) end , serialMute[serial] , 1 ,source ) serialMute[serial] = nil end end ) --]] LOCAL_CHAT = true -- enable local chat LOCAL_CHAT_DIS =
  5. local table_ = { -- [ button Name ] = [ Weather number ], [ button1 ] = 9, [ button2 ] = 5, [ button3 ] = 6, } addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) for k, v in pairs ( table_ ) do if ( source == k ) then setWeather ( v ) end end end )
  6. setTimer ( function () local theCol = getElementData(root, "BlockExportCol") function isInColExport () if isElement(theCol) and isElementWithinColShape(localPlayer,theCol) then return true else return false end end function ClientExplosionCFunction() if isInColExport () then cancelEvent () end end addEventHandler("onClientExplosion", root, ClientExplosionCFunction) end , 1000, 1 ) local screX, screY = guiGetScreenSize() Window_VS = guiCreateWindow(205, 51, 417, 465, "Car Panel | لوحة السيارات", false) guiWindowSetSizable(Window_VS, false) guiSetAlpha(Window_VS, 1.00) guiSetVisible(Window_VS,false) Grid_VS = guiCreateGridList(10, 55, 388, 166, false, Window_VS) guiGridListAddColumn(Grid_VS, "Vehicle", 0.5) guiGridListAddColumn(Grid_VS, "Hp", 0.5) label1 = guiCreateLabel(141, 30, 128, 15, " سياراتك الخاصة بك :", false, Window_VS) Button_VS_sn = guiCreateButton(10, 231, 93, 45, "Crate", false, Window_VS) guiSetProperty(Button_VS_sn, "NormalTextColour", "FFFFFEFE") Button_VS_dy = guiCreateButton(113, 231, 93, 45, "Destroyer", false, Window_VS) guiSetProperty(Button_VS_dy, "NormalTextColour", "FFFFFEFE") Button_VS_Fix = guiCreateButton(216, 231, 93, 45, "reapir", false, Window_VS) guiSetProperty(Button_VS_Fix, "NormalTextColour", "FFFFFEFE") Button_VS_Warp = guiCreateButton(314, 231, 93, 45, "Spawn", false, Window_VS) guiSetProperty(Button_VS_Warp, "NormalTextColour", "FFFFFEFE") Button_VS_lk = guiCreateButton(146, 287, 119, 44, "Lock\open Car", false, Window_VS) guiSetProperty(Button_VS_lk, "NormalTextColour", "FFFFFEFE") label2 = guiCreateLabel(1, 331, 413, 21, "_______________________________________________________________", false, Window_VS) label3 = guiCreateLabel(146, 362, 142, 17, "سيارات السيرفر :", false, Window_VS) GUIEditor.button[b1] = guiCreateButton(9, 387, 112, 49, "NRG-500", false, Window_VS) guiSetProperty(GUIEditor.button[b1], "NormalTextColour", "FFC3E830") GUIEditor.button[b2] = guiCreateButton(151, 387, 112, 49, "Maverick", false, Window_VS) guiSetProperty(GUIEditor.button[b2], "NormalTextColour", "FFFF0000") GUIEditor.button[b3] = guiCreateButton(294, 387, 112, 49, "Polcie Ranger", false, Window_VS) guiSetProperty(GUIEditor.button[b3], "NormalTextColour", "FF30E01E") label4 = guiCreateLabel(210, 493, 135, 15, "Edit By : Ja[b]er[X]Pro", false, Window_VS) function updateGridList() local data = getElementData(localPlayer, "VehicleInfo") if data then local rw, cl = guiGridListGetSelectedItem(Grid_VS) guiGridListClear(Grid_VS) for i, data in ipairs (data) do local carName = getVehicleNameFromModel(data["Model"]) local ID = data["ID"] local Cost = data["Cost"] local HP = math.floor(data["HP"]) local PreCost = math.ceil(Cost*.9*HP/100/10) local row = guiGridListAddRow(Grid_VS) guiGridListSetItemText(Grid_VS, row, 1, carName, false, true) guiGridListSetItemData(Grid_VS, row, 1, ID) guiGridListSetItemText(Grid_VS, row, 2, HP.." HP", false, true) end guiGridListSetSelectedItem(Grid_VS, rw, cl) end end outputChatBox("Vehicle System Edit By Jaber&Hmo-Goda", 255, 125, 0) bindKey("F1", "down", function() guiSetVisible(Window_VS,true) guiSetVisible (Window_CHK, false) showCursor(guiGetVisible(Window_VS)) end) triggerServerEvent("onOpenGui", localPlayer) addEventHandler("onClientElementDataChange", root, function(dd) if getElementType(source) == "player" and source == localPlayer and dd == "VehicleInfo" then local data = getElementData(source, dd) if data then updateGridList() end end end) function WINDOW_CLICK_VEHICLE (button, state, absoluteX, absoluteY) local id = guiGridListGetSelectedItem(Grid_VS) local ID = guiGridListGetItemData(Grid_VS, id, 1) if source == Button_VS_close then guiSetVisible(Window_VS, false) showCursor(false) end if (source == Grid_VS) then if id == -1 and idd then guiGridListSetSelectedItem(Grid_VS, idd, 1) return false else idd = guiGridListGetSelectedItem(Grid_VS) end elseif id == -1 then elseif (source == Button_VS_sn) then if not isInColExport () then triggerServerEvent("SpawnMyVehicle", localPlayer, ID) end elseif (source == Button_VS_dy) then triggerServerEvent("DestroyMyVehicle", localPlayer, ID) elseif (source == Button_VS_lt) then triggerServerEvent("LightsMyVehicle", localPlayer, ID) elseif (source == Button_VS_bp) then triggerServerEvent("BlipMyVehicle", localPlayer, ID) elseif (source == Button_VS_lk) then triggerServerEvent("LockMyVehicle", localPlayer, ID) elseif (source == Button_VS_sl) then guiSetVisible(Window_CHK, true) local carName = guiGridListGetItemText(Grid_VS, guiGridListGetSelectedItem(Grid_VS), 1) local carprice = guiGridListGetItemText(Grid_VS, guiGridListGetSelectedItem(Grid_VS), 2) guiSetText(Label_CHK, 'Are you sure you want to sell this Vehicle "'..carName..'" for $'..carprice) elseif source == Button_VS_Spc then if getElementInterior(localPlayer) == 0 then if getElementData(localPlayer,"Stats") < 0 then SpecVehicle(ID) end end elseif source == Button_VS_Fix then triggerServerEvent("FixMyVehicle", localPlayer, ID) elseif source == Button_VS_Warp then if not isInColExport () then triggerServerEvent("WarpMyVehicle", localPlayer, ID) end end end addEventHandler("onClientGUIClick", resourceRoot, WINDOW_CLICK_VEHICLE) function SpecVehicle(id) if spc then removeEventHandler("onClientPreRender", root, Sp) setCameraTarget(localPlayer) if isTimer(freezTimer) then killTimer(freezTimer) end freezTimer = setTimer(function() setElementFrozen(localPlayer, false) end, 2500, 1) spc = false return end for i, vehicle in ipairs(getElementsByType("vehicle")) do if getElementData(vehicle, "Owner") == localPlayer and getElementData(vehicle, "ID") == id then cVeh = vehicle spc = true addEventHandler("onClientPreRender", root, Sp) guiSetVisible(Window_VS, false) showCursor(false) break end end end function Sp() if isElement(cVeh) then local x, y, z = getElementPosition(cVeh) setElementFrozen(localPlayer, true) setCameraMatrix(x, y-1, z+15, x, y, z) else removeEventHandler("onClientPreRender", root, Sp) setCameraTarget(localPlayer) if isTimer(freezTimer) then killTimer(freezTimer) end freezTimer = setTimer(function() setElementFrozen(localPlayer, false) end, 2500, 1) spc = false end end ShopMarkersTable = {} local ShopTable = { [1] = {ID = {{491, 1441400} ,{540, 1436800} ,{401, 1430000} ,{546, 1527700} ,{505, 1414000} ,{500, 1402600} ,{463, 1659300} ,{492, 1459300} ,{547, 1429600} ,{586, 1629600} ,{467, 1354300} ,{479, 1244800} ,{404, 1059900} ,{410, 946200} ,{471, 593600} ,{418, 300000} }, vPosX = 2134, vPosY = -1170, vPosZ = 28.15, PosX = 2133, PosY = -1149, PosZ = 23.4, CamX = 2134.1, CamY = -1160, CamZ = 35, lookAtX = 2133.3, lookAtY = -1168, lookAtZ = 28}, [2] = {ID = {{516, 1819800} ,{458, 1815300} ,{580, 1801600} ,{421, 1801600} ,{527, 1667300} ,{581, 2151400} ,{409, 1744500} ,{585, 1696600} ,{474, 1573800} ,{419, 1539500} ,{436, 1539500} ,{545, 1530400} ,{466, 1616700} ,{529, 1580200} ,{550, 1473400} ,{468, 1966500} }, vPosX = 552, vPosY = -1288, vPosZ = 18, PosX = 562, PosY = -1270, PosZ = 16, CamX = 552, CamY = -1275.82, CamZ = 21.61, lookAtX = 552, lookAtY = -1276.77, lookAtZ = 21.29}, [3] = {ID = {{533, 1973100} ,{555, 1943400} ,{507, 2041200} ,{521, 2427500} ,{461, 2427500} ,{566, 1995500} ,{551, 1972700} ,{400, 1970400} ,{558, 1863600} ,{549, 1824800} ,{579, 1902000} ,{576, 1797400} ,{526, 1781400} ,{517, 1772300} ,{575, 1763200} ,{561, 1822100} }, vPosX = 1942.5, vPosY = 2052, vPosZ = 11, PosX = 1946, PosY = 2068, PosZ = 10, CamX = 1930.36, CamY = 2052.78, CamZ = 14.71, lookAtX = 1931.36, lookAtY = 2052.78, lookAtZ = 14.43}, [4] = {ID = {{536, 2201300} ,{567, 2258000} ,{602, 2135100} ,{534, 2128300} ,{426, 2214600} ,{439, 2114600} ,{412, 2114600} ,{587, 2087200} ,{565, 2084900} ,{589, 2082600} ,{542, 2071200} ,{496, 2043900} ,{535, 2043900} ,{405, 2127900} ,{445, 2107300} ,{518, 1980000} }, vPosX = -1950, vPosY = 266, vPosZ = 36.2, PosX = -1954, PosY = 299, PosZ = 34, CamX = -1960.18, CamY = 266.06, CamZ = 37.94, lookAtX = -1959.2, lookAtY = 266.06, lookAtZ = 37.73}, [5] = {ID = {{411, 3000000} ,{429, 2765000} ,{541, 2746700} ,{451, 2739900} ,
  7. ما يحتاج تكثر كلام .. طلبه واضح جدا قال انه ما يقدر يغير سلاح غير اللي يحطه اكيد راح يكون مستخدم فنكشن اعطاء سلاح
  8. مالها علاقة بطلبه . !
  9. هنا مجرد مثال لازم تغيرها ع حسب كودكـ player الـ toggleControl ( player, "next_weapon", false ) toggleControl ( player, "previous_weapon", false )
  10. الكود صحيح .. طبعا انت مسوي تحقق انه لو كان الشخص اللي دخل هو اللي مسوي الماركر يعني لو جا شخص ثاني ودخل ما راح يضبط
  11. ما ادري ليه تحب تعقد الشغلة ع نفسكـ .. ويعني فهمني هذي الشغلة للان ما فهمتها ليه يوم يدخل الماركر تسوي تريقر بعدين بكلنت ترجع تسوي تريقر وبعدين ترجع تسوي تريقر لكلنت ؟؟؟؟ !!!! سوي تريقر واحد يوم يدخل الماركر وخلاصصص !!!
  12. البلير مجرد مثال هنا .. لكن ع حسب كودكـ تحطه مثلأ : local markers = { } addCommandHandler ( "sell", function ( player ) markers [ player ] = createMarker ( ... ) end ) بـ هذي الحالة انت ربط الماركر بـ اللاعب يعني راح تنحل المشكلة هذي .
  13. وعليكم السلام المشكلة ي عزيزي انكـ تحتاج تسوي تيبل .. لذلك حط صناعة الماركر بـ جانب سيرفر markers = { } markers [ player ] = createMarker ( ... )
  14. العفو .. يب حلو اهم شي انك تستفيد من اخطاءك والخطا حقكـ بسيط واي واحد ينسى فاصلة او الخ .. debugscript لكن انصحك تستخدم عشان السبب انه ليه ما يشغل الكود حقكـ .
  15. الخطا طبعا كنت ناسي الفاصلة بعد الروت addEventHandler("onPlayerChat",getRootElement(), function (msg) playSoundFrontEnd ( source, 49 ) end )
  16. طيب حلو حاول انكـ تصنع الكود .. وبساعدكـ .. راح تشوف امثلة لكل وحدة عطيتك هي .
  17. وعليكم السلام .. طيب كيف اساعدك بدون كود .. اطرح كودك .
  18. طيب اضغط ع كل وظيفة عطيتك هي .. وشوف شرحها وتعلم ..
  19. انصحكـ تزيد خبرتك وبعدين سوي اللي تبيه .. تعلم الاساسيات
  20. هذي الوظائف اللي تحتاجها .. وتسوي كودك فيها .. حاول وبساعدكـ
  21. اول شي هذا ملف سيرفر مو كود الاكواد تنقسم لـ قسمين .. قسم بجانب كلنت وقسم بجانب سيرفر اللي راح تحتاجه عشان تسوي طلبكـ .. بجانب سيرفر طبعا Event: "onPlayerChat" isTimer getTimerDetails setTimer
×
×
  • Create New...