Jump to content

Master_MTA

Members
  • Posts

    3,389
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Master_MTA

  1. تفضل اخوي outputChatBox("#ff0000*#ccccccADMIN CLEARED CHAT",root,250,250,250,true)
  2. اخوي فهمت غلط علي انت انا ما ابيه لو ظغط في اي مكان ابيه مثل لوحتك مثلا اللي بطاره يوم يظغط على حرف m بس واسف معليش تعبتك @3NAD
  3. ما فهمت عليك يعني تبي لون النجمه يكون احمر والباقي رمادي
  4. ههههههههههههههههههههههههههههههههههههههههههههههههههههه
  5. تبيها تتلون يعني اخي يعني تجلس تقلب الوان؟
  6. تفضل اخوي المود كامل http://up.top4top.net/downloadf-3166b9ay1-zip.html بس لازم تروح جروب ادمن وتضيفه يعني روح ادمن كانك بتعطي رتبه لواحد وسوي كذا resource.7maya-tkrar-kick
  7. لا اخوي لو تبي تلون الكلام داخل الاقواس استخدم اكواد الالوان هاذي مثل كذا outputChatBox("*#FF0000ADMIN #33FF00CLEARED #000000CHAT",root,200,200,200,true)
  8. هذي يا اخي الالوان 255,0,0 وتقدر لو تبي تشوف الالوان تفضل الموقع ذا http://www.w3schools.com/html/html_colors.asp
  9. تفضل اخوي --***********************************-- -- By MR.S3D -- -- Server Side -- --***************please dont remove********************-- ---------------------- --Coordinates in the prison and outside prison ---------------------- ------ This is Coordinates where the prison local x, y, z = 198, 162, 1003 local interior_jail = 3 -- this is Coordinates to get out of prison local interior_unjail = 0 local x1, y1, z1 = 780, -1327, 13 ------------------------------------------------- rRoot = getResourceRootElement(getThisResource()) local timeLeft = {} local timeLeftText = {} local mint = 60 -- this 1 min local f = 120 -- this 2 min local s3m = 180 -- this 3 min local s4m = 240 -- this 4 min local s5m = 300 -- this 5 min local s1h = 3600 -- 1 hour function RemoveFromVeh(plr) hisVeh = getPedOccupiedVehicle(plr) if hisVeh then removePedFromVehicle(plr) end end addEvent("jail",true) -- Jail addEventHandler("jail",root, function(isJailed,text) if text == "1 min" then thePlayer = getPlayerFromName(isJailed) if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",isJailed,255,0,0) return end RemoveFromVeh(thePlayer) setElementInterior ( thePlayer, interior_jail ) setElementPosition (thePlayer, x, y, z ) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "sprint", true) toggleControl (thePlayer, "aim_weapon", false) toggleControl (thePlayer, "weapon", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "vehicle_fire", false) toggleControl (thePlayer, "vehicle_secondary_fire", false) showPlayerHudComponent (thePlayer, "ammo", false) showPlayerHudComponent (thePlayer, "weapon", false) setElementData(thePlayer, "Timeleft", tonumber(mint)) showTimeLeft(thePlayer) setElementData(thePlayer,"isJailed",true) setElementData(getResourceRootElement(getThisResource()),"".. getPlayerSerial(thePlayer).."-j",true) outputChatBox("** You arrested [ "..getPlayerName(thePlayer).." #FFFF00]For 1 min",source,255,255,0,true) outputChatBox("** [ "..getPlayerName(thePlayer).." #FF0000] Player has been arrested ",root,255,0,0,true) elseif text == "2 min" then thePlayer = getPlayerFromName(isJailed) if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",isJailed,255,0,0) return end RemoveFromVeh(thePlayer) setElementInterior ( thePlayer, interior_jail ) setElementPosition (thePlayer, x, y, z ) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "sprint", true) toggleControl (thePlayer, "aim_weapon", false) toggleControl (thePlayer, "weapon", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "vehicle_fire", false) toggleControl (thePlayer, "vehicle_secondary_fire", false) showPlayerHudComponent (thePlayer, "ammo", false) showPlayerHudComponent (thePlayer, "weapon", false) setElementData(thePlayer, "Timeleft", tonumber(f)) showTimeLeft(thePlayer) setElementData(thePlayer,"isJailed",true) setElementData(getResourceRootElement(getThisResource()),"".. getPlayerSerial(thePlayer).."-j",true) outputChatBox("** You arrested [ "..getPlayerName(thePlayer).." #FFFF00]For 2 min",source,255,255,0,true) outputChatBox("** [ "..getPlayerName(thePlayer).." #FF0000] Player has been arrested ",root,255,0,0,true) elseif text == "3 min" then thePlayer = getPlayerFromName(isJailed) if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",isJailed,255,0,0) return end RemoveFromVeh(thePlayer) setElementInterior ( thePlayer, interior_jail ) setElementPosition (thePlayer, x, y, z ) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "sprint", true) toggleControl (thePlayer, "aim_weapon", false) toggleControl (thePlayer, "weapon", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "vehicle_fire", false) toggleControl (thePlayer, "vehicle_secondary_fire", false) showPlayerHudComponent (thePlayer, "ammo", false) showPlayerHudComponent (thePlayer, "weapon", false) setElementData(thePlayer,"isJailed",true) setElementData(thePlayer, "Timeleft", tonumber(s3m)) showTimeLeft(thePlayer) setElementData(getResourceRootElement(getThisResource()),"".. getPlayerSerial(thePlayer).."-j",true) outputChatBox("** You arrested [ "..getPlayerName(thePlayer).." #FFFF00]For 3 min",source,255,255,0,true) outputChatBox("** [ "..getPlayerName(thePlayer).." #FF0000] Player has been arrested ",root,255,0,0,true) elseif text == "4 min" then thePlayer = getPlayerFromName(isJailed) if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",isJailed,255,0,0) return end RemoveFromVeh(thePlayer) setElementInterior ( thePlayer, interior_jail ) setElementPosition (thePlayer, x, y, z ) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "sprint", true) toggleControl (thePlayer, "aim_weapon", false) toggleControl (thePlayer, "weapon", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "vehicle_fire", false) toggleControl (thePlayer, "vehicle_secondary_fire", false) showPlayerHudComponent (thePlayer, "ammo", false) showPlayerHudComponent (thePlayer, "weapon", false) setElementData(thePlayer,"isJailed",true) setElementData(thePlayer, "Timeleft", tonumber(s4m)) showTimeLeft(thePlayer) setElementData(getResourceRootElement(getThisResource()),"".. getPlayerSerial(thePlayer).."-j",true) outputChatBox("** You arrested [ "..getPlayerName(thePlayer).." #FFFF00]For 4 min",source,255,255,0,true) outputChatBox("** [ "..getPlayerName(thePlayer).." #FF0000] Player has been arrested ",root,255,0,0,true) elseif text == "5 min" then thePlayer = getPlayerFromName(isJailed) if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",isJailed,255,0,0) return end RemoveFromVeh(thePlayer) setElementInterior ( thePlayer, interior_jail ) setElementPosition (thePlayer, x, y, z ) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "sprint", true) toggleControl (thePlayer, "aim_weapon", false) toggleControl (thePlayer, "weapon", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "vehicle_fire", false) toggleControl (thePlayer, "vehicle_secondary_fire", false) showPlayerHudComponent (thePlayer, "ammo", false) showPlayerHudComponent (thePlayer, "weapon", false) setElementData(thePlayer,"isJailed",true) setElementData(thePlayer, "Timeleft", tonumber(s5m)) showTimeLeft(thePlayer) setElementData(getResourceRootElement(getThisResource()),"".. getPlayerSerial(thePlayer).."-j",true) outputChatBox("** You arrested [ "..getPlayerName(thePlayer).." #FFFF00]For 5 min",source,255,255,0,true) outputChatBox("** [ "..getPlayerName(thePlayer).." #FF0000] Player has been arrested ",root,255,0,0,true) elseif text == "1 hour" then thePlayer = getPlayerFromName(isJailed) if getElementData( thePlayer, "isJailed") then outputChatBox("This player is already in jail.",isJailed,255,0,0) return end RemoveFromVeh(thePlayer) setElementInterior ( thePlayer, interior_jail ) setElementPosition (thePlayer, x, y, z ) toggleControl (thePlayer, "fire", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "previous_weapon", false) toggleControl (thePlayer, "sprint", true) toggleControl (thePlayer, "aim_weapon", false) toggleControl (thePlayer, "weapon", false) toggleControl (thePlayer, "next_weapon", false) toggleControl (thePlayer, "vehicle_fire", false) toggleControl (thePlayer, "vehicle_secondary_fire", false) showPlayerHudComponent (thePlayer, "ammo", false) showPlayerHudComponent (thePlayer, "weapon", false) setElementData(thePlayer,"isJailed",true) setElementData(thePlayer, "Timeleft", tonumber(s1h)) showTimeLeft(thePlayer) setElementData(getResourceRootElement(getThisResource()),"".. getPlayerSerial(thePlayer).."-j",true) outputChatBox("** You arrested [ "..getPlayerName(thePlayer).." #FFFF00]For 1 hour",source,255,255,0,true) outputChatBox("** [ "..getPlayerName(thePlayer).." #FF0000] Player has been arrested ",root,255,0,0,true) end end ) addEvent("unjail",true)-- unJail addEventHandler("unjail",root, function(isJailed) thePlayer = getPlayerFromName(isJailed) if thePlayer then if not getElementData( thePlayer, "isJailed") then outputChatBox("This player is not in jail.",isJailed,255,0,0) return end setElementInterior ( thePlayer, interior_unjail ) setElementPosition ( thePlayer, x1, y1, z1 ) toggleControl (thePlayer, "fire", true) toggleControl (thePlayer, "next_weapon",true) toggleControl (thePlayer, "previous_weapon", true) toggleControl (thePlayer, "sprint", true) toggleControl (thePlayer, "aim_weapon", true) toggleControl (thePlayer, "weapon", true) toggleControl (thePlayer, "next_weapon", true) toggleControl (thePlayer, "vehicle_fire", true) toggleControl (thePlayer, "vehicle_secondary_fire", true) setElementData(thePlayer, "Timeleft", false) setElementData(thePlayer,"isJailed",false) setElementData(thePlayer, "Timeleft", 0) textDestroyDisplay(timeLeft[thePlayer]) setElementData(rRoot,"".. getPlayerSerial(thePlayer).."-j",false) outputChatBox("** You are Now out of prison [ "..getPlayerName(thePlayer).." #FFFF00] Please respect the rule of server",source,255,255,0,true) outputChatBox("** [ "..getPlayerName(thePlayer).." #FFFF00] has been out of prison ",root,255,255,0,true) end end) addEventHandler("onPlayerSpawn",root, -- Check If He Is isJailed [ OnSpawn ] function() if getElementData(source,"isJailed") == true then setElementInterior ( source, interior_jail ) setElementPosition (source, x, y, z ) RemoveFromVeh(thePlayer) end end) addEventHandler("onPlayoin",root, -- Check If He Is isJailed - By IP [ OnJoin ] function() if getElementData(rRoot,""..getPlayerSerial(source).."-j") == true then setElementData(source,"isJailed",true) setElementInterior ( source, interior_jail ) setElementPosition (source, x, y, z ) end end) function showTimeLeft(player) timeLeft[player] = textCreateDisplay() textDisplayAddObserver(timeLeft[player], player) timeLeftText[player] = textCreateTextItem("Time Left: " .. getElementData(player, "Timeleft"), 0.45, 0.1, "high", 255, 255, 255, 255) textDisplayAddText(timeLeft[player], timeLeftText[player]) setTimer(updateTimeLeft, 1000, getElementData(player, "Timeleft"), player) end function updateTimeLeft(player) local name = getPlayerName(player) setElementData(player, "Timeleft", getElementData(player, "Timeleft") - 1) textItemSetText(timeLeftText[player], "Time Left: " .. getElementData(player, "Timeleft")) if tonumber(getElementData(player, "Timeleft")) == 0 then textDestroyDisplay(timeLeft[player]) setElementInterior ( player, interior_unjail ) setElementPosition(player, x1, y1, z1) outputChatBox("** [ "..name.." #FFFF00] has been out of prison ",root,255,255,0,true) setElementData(rRoot,"".. getPlayerSerial(thePlayer).."-j",false) setElementData (player, "isJailed",false) toggleControl (player, "fire", true) toggleControl (player, "next_weapon",true) toggleControl (player, "previous_weapon", true) toggleControl (player, "sprint", true) toggleControl (player, "aim_weapon", true) toggleControl (player, "weapon", true) toggleControl (player, "next_weapon", true) toggleControl (player, "vehicle_fire", true) toggleControl (player, "vehicle_secondary_fire", true) end end addEvent( "slap", true) --- slap addEventHandler( "slap", getRootElement(), function ( PlayerNick ) local toWho = getPlayerFromName ( PlayerNick ) local name = getPlayerName ( source ) data = 100 if ( getElementHealth ( toWho ) > 0 ) and ( not isPedDead ( toWho ) ) then if ( tonumber ( data ) > getElementHealth ( toWho ) ) then setTimer ( killPed, 50, 1, toWho ) else setElementHealth ( toWho, getElementHealth ( toWho ) - data ) end local x, y, z = getElementVelocity ( toWho ) setElementVelocity ( toWho, x , y, z + 0.2 ) outputChatBox("".. PlayerNick .." has been slapped by " .. name ..". (100 HP)", root, 255, 0, 170, true ) end end) addEvent( "destroy", true) ----destroy car addEventHandler( "destroy", getRootElement(), function ( PlayerNick ) local toWho = getPlayerFromName ( PlayerNick ) local name = getElementData(source, "driverName") or "Unknown" local theVehicle = getPedOccupiedVehicle ( toWho ) destroyElement ( theVehicle ) outputChatBox("Your vehicle has been destroyed by ".. name ..".", toWho, 255, 0, 0, true ) end ) addEvent( "kickm", true) -- kick addEventHandler( "kickm", getRootElement(), function ( PlayerNick ) local toWho = getPlayerFromName ( PlayerNick ) local name = getPlayerName ( source ) kickPlayer ( toWho, source, "Please respect the laws of the server" ) outputChatBox("Player ".. PlayerNick .." has been kick By ".. name ..".", getRootElement(), 255, 0, 0, true ) end ) ----------------- -- on admin login trigger client to make panel ---------------- --------------- -- on start check is theree any admin --------------- addEvent("checkPermission",true) addEventHandler("checkPermission",root, function() for i,v in ipairs(getElementsByType"player") do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("Police")) then addEventHandler( "onElementClicked",getRootElement(), masternew) else removeEventHandler( "onElementClicked",getRootElement(), masternew) triggerClientEvent(v,"noopenpolice",v) end end end ) function masternew ( _, _, thePlayer ) local account = getPlayerAccount(thePlayer) if getElementType( source ) == "player" or getElementType( source ) == "vehicle" then triggerClientEvent ( thePlayer, "openpolice" ,thePlayer,getPlayerName(getVehicleController(source)),getPlayerName(source),getElementData(source, "driverName") or "Unknown") end end addEventHandler ( "onVehicleEnter", root, function ( player , seat ) if seat == 0 then setElementData(source, "driverName", getPlayerName(player)) end end ) والكلنت --***********************************-- -- By MR.S3D -- -- Client Side -- --***************please dont remove********************-- -------------------- --Key For Open Panel ------------------- ----------------- -- when start check Is there any admin ---------------- ---------------- --panel for admin only ---------------- local screenW, screenH = guiGetScreenSize() mainwndmaster = guiCreateWindow(screenW - 393 - 10, (screenH - 562) / 2, 393, 562, "", false) guiSetAlpha(mainwndmaster,0.89999997615814) guiSetVisible(mainwndmaster,false) ali1 = guiCreateLabel(24, 524, 78, 19, "Work State :", false, mainwndmaster) guiLabelSetColor(ali1, 250, 0, 0) ali2 = guiCreateLabel(121, 524, 78, 19, "Work State :2", false, mainwndmaster) guiLabelSetColor(ali2, 250, 0, 0) ali3 = guiCreateLabel(215, 524, 78, 19, "State : ", false, mainwndmaster) guiLabelSetColor(ali3, 250, 0, 0) ali4 = guiCreateLabel(303, 524, 78, 19, "Online", false, mainwndmaster) guiLabelSetColor(ali4, 38, 238, 11) wnd14 = guiCreateButton(24, 431, 349, 35, "Destroy Car", false, mainwndmaster) guiSetProperty(wnd14, "NormalTextColour", "FF09F2AE") wnd11 = guiCreateButton(24, 386, 349, 35, "Slap", false, mainwndmaster) guiSetProperty(wnd11, "NormalTextColour", "FFFB0101") wnd8 = guiCreateButton(24, 296, 349, 35, "Jail", false, mainwndmaster) guiSetProperty(wnd8, "NormalTextColour", "FFFDBE01") master = guiCreateButton(24, 476, 349, 35, "اللغة العربية", false, mainwndmaster) guiSetProperty(master, "NormalTextColour", "FFDF1B4E") wnd5 = guiCreateGridList(27, 39, 346, 247, false, mainwndmaster) guiGridListSetSelectionMode(wnd5,2) local column = guiGridListAddColumn(wnd5,"Jail Time", 0.9) row1 = guiGridListAddRow(wnd5) row2 = guiGridListAddRow(wnd5) row3 = guiGridListAddRow(wnd5) row4 = guiGridListAddRow(wnd5) row5 = guiGridListAddRow(wnd5) row6 = guiGridListAddRow(wnd5) guiGridListSetItemText(wnd5,row1,column,"1 min", false, false) guiGridListSetItemColor ( wnd5, row1, column, 0, 0, 255 ) guiGridListSetItemText(wnd5,row2,column,"2 min", false, false) guiGridListSetItemColor ( wnd5, row2, column, 0, 0, 255 ) guiGridListSetItemText(wnd5,row3,column,"3 min", false, false) guiGridListSetItemColor ( wnd5, row3, column, 0, 0, 255 ) guiGridListSetItemText(wnd5,row4,column,"4 min", false, false) guiGridListSetItemColor ( wnd5, row4, column, 0, 0, 255 ) guiGridListSetItemText(wnd5,row5,column,"5 min", false, false) guiGridListSetItemColor ( wnd5, row5, column, 0, 0, 255 ) guiGridListSetItemText(wnd5,row6,column,"1 hour", false, false) guiGridListSetItemColor ( wnd5, row6, column, 0, 0, 255 ) wnd6 = guiCreateButton(24, 341, 349, 35, "UnJail", false, mainwndmaster) guiSetProperty(wnd6, "NormalTextColour", "FF0CF706") --------------------- --Key to poen panel --------------------- bindKey ("m", "down", -- binds B key to toggle cursor state function() guiSetVisible(mainwndmaster,false) guiSetText(mainwndmaster,"" ) triggerServerEvent ("checkPermission", getLocalPlayer()) showCursor( not isCursorShowing() ) end) addEvent("openpolice",true) addEventHandler("openpolice",root, function(Target1,ownerveh1,target3) if not guiGetVisible(mainwndmaster, true) then guiSetVisible(mainwndmaster,true) guiSetText(mainwndmaster,Target1 or ownerveh1 or target3 ) end end ) addEvent("noopenpolice",true) addEventHandler("noopenpolice",root, function() guiSetVisible(mainwndmaster,false) end ) ----------------------- --add player to list ---------------------- --------------------- --close panel --------------------- ---------------------- -- Watch the player ---------------------- function spectatePlayer(player) if tostring(player) then int = getElementInterior(player) dim = getElementDimension(player) if int and dim then setCameraTarget(player) setElementInterior(player,int) setElementDimension(player,dim) end end end ---------------------- --When client click button --------------------- function onClickza() if source == wnd11 then -- slap selectedPlayerslap = guiGetText(mainwndmaster) if selectedPlayerslap then triggerServerEvent ("slap", getLocalPlayer(), tostring(selectedPlayerslap)) end elseif source == wnd14 then -- destroy triggerServerEvent ("destroy", getLocalPlayer(), tostring(selectedPlayerslap)) elseif source == wnd8 then -- jail jail = guiGridListGetItemText ( wnd5, guiGridListGetSelectedItem ( wnd5 ), 1 ) if jail then triggerServerEvent ("jail", getLocalPlayer(), tostring(selectedPlayerslap), jail) end elseif source == wnd6 then -- unjail if selectedPlayerslap then triggerServerEvent ("unjail", getLocalPlayer(), tostring(selectedPlayerslap)) end end end addEventHandler("onClientGUIClick",root,onClickza) @3NAD لو تعدلها وترسلها خاص اكون شاكر اخوي عناد #Edit: لو تسمحو شباب لو تقدرو تعدلوها اكون شاكر @</Mr.Tn6eL> @iPrestege @3NAD @Abdul KariM @N3xT @Default
  10. @N3xT يعني اخوي قصدك كذا ? getElementData(source, "driverName") or "Unknown" --------------------------------------------------------------------- getPlayerName(getElementData(source, "driverName") or "Unknown") وتحقق الالمنت بيكون كذا if getElementType(source) == "vehicle" then #Edit: @N3xT @3NAD @</Mr.Tn6eL> اخواني الحين في شي اللوحه شغاله ومزبوط كل شي بس لما يخش احد السيرفر ما تفتح ابد حتى لو ضغطت عليه او على نفسي
  11. قصدك كذا اخوي local counter = {} getOcc = function ( plr, veh ) -- plr = player element, veh = vehicle element * if not counter [ plr ] then counter [ plr ] = 0; end for seat, player in pairs(getVehicleOccupants( veh )) do counter[plr] = counter[plr] + 1 end return counter [ plr ] end addEventHandler ( 'onVehicleExit', root, function ( plr, seat, jacked ) local count = getOcc ( plr, source ) if count == 0 then setElementData ( plr, 'lastUsed', plr ) counter [ plr ] = 0; end end) addEventHandler ( 'onVehicleEnter', root, function ( plr, seat, jacked ) setElementData ( plr, 'lastCarUsed', plr ) end) @N3xT
  12. هههههههههههه يعطيك العافيه بس معلش طلب ثاني وهو اخوي الحين لو بغيت اخر واحد استخدم ايضا يعني لو السياره فاضيه وبغيت اخر واحد استخدمها اكون شاكر @Default
  13. في انتظار الرد @Default @Abdul KariM
  14. يعطيك العافيه حبيب قلبي والله بس الاخ عناد افادني في الخاص تسلمون والله مشكورين على مروركم
  15. @</Mr.Tn6eL> يعطيك الف عافيه والله افاده رائعه رائعه رائعه لكن الاستخدام يكون سيرفر او سيرفر وكلنت ووين اضع كود الوظيفه لو سمحت كلنت ولا سيرفر
  16. اها اخوي طيب انا سويت تعديل بسيط وابي الشخص اللي يسوق السياره يعني كذا function masternew ( _, _, thePlayer ) local account = getPlayerAccount(thePlayer) if account and not isGuestAccount(account) and isObjectInACLGroup("user." .. getAccountName(account), aclGetGroup("Police")) then if getElementType( source ) == "player" or getElementType( source ) == "vehicle" then triggerClientEvent ( thePlayer, "openpolice" ,thePlayer,getPlayerName(getVhicleController(source)),getPlayerName(source)) end end end @</Mr.Tn6eL> وخليت الكلنت كذا function(Target1,ownerveh1) if not guiGetVisible(mainwndmaster, true) then guiSetVisible(mainwndmaster,true) guiSetText(mainwndmaster,Target1 or ownerveh1)
  17. اخي هل بكذا الاسم اللي بيطلع باللوحه بيكون حق الشخص اللي ضغت عليه ولا الشخص اللي داس بالماوس على الشخص @</Mr.Tn6eL>
  18. اتوقع اخوي لو بدلت ذي بالمصدر يكون افضل يعني تخليها كذا addEventHandler("onColShapeLeave",Col,function (LeaveElement) هذي لو تبدلها كذا يكون افضل addEventHandler("onColShapeLeave",Col,function (source)
  19. مدري ما شفت ض1 دقايق اشوف تفضل اخوي اول صوره الثانيه الثالثه
  20. ما زبط للاسف اخوي بس على العموم تمت الافاده من الاخ عناد مشكوريننننن
  21. مشكور اخوي حليت المشكله
  22. شباب معليش وش الخطا هنا سيرفر سايد addEvent("checkPermission",true) addEventHandler("checkPermission",root, function() for i,v in ipairs(getElementsByType"player") do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("Police")) then addEventHandler( "onElementClicked",root, masternew) else removeEventHandler( "onElementClicked",root, masternew) triggerClientEvent(v,"noopenpolice",v) end end end ) function masternew ( Target,veh ) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local ali88 = getPedOccupiedVehicle(Target) local masterfin = getPlayerName(ali88) local thePlayer = getElementType( source ) == "player" or getElementType( source ) == veh assasasa = getElementType ( thePlayer ) if isObjectInACLGroup("user." .. account, aclGetGroup("Police")) then if thePlayer then triggerClientEvent ( source, "openpolice" ,source,Target,masterfin) end end end كلنت سايد bindKey ("m", "down", -- binds B key to toggle cursor state function() guiSetVisible(mainwndmaster,false) triggerServerEvent ("checkPermission", getLocalPlayer()) showCursor( not isCursorShowing() ) end) addEvent("openpolice",true) addEventHandler("openpolice",root, function(Target,masterfin) local ali99 = getPlayerName(Target) if not guiGetVisible(mainwndmaster, true) then guiSetVisible(mainwndmaster,true) guiSetText(mainwndmaster, ali99 or masterfin) end end ) @Abdul KariM @!#NssoR_) @3NAD
  23. السلام عليكم شباب كيف الحال اليوم انا حبيت اطلب كود وهو اللي يحطلي الوقت في جريد لست وهذي اكواد مود الساعات اللي عندي سيرفر ------------------------------------------------------------------------------------ -- RIGHTS: All rights reserved by developers -- DEVELOPERS: Oscar Ernesto (The'Oskar) -- Don't Touch This or a Cat will Die D:!!!!!!!! ------------------------------------------------------------------------------------ call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "Play Time" ) ---Export of ScoreBoard addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Play Time" , "00:00 " ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Play Time" , "N/A" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Play Time" , "00:00" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerLogout" , root , function ( pAccount ) local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Play Time" , "N/A" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function actualizarJugadorOn ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Play Time" , hours .. ":" .. minutes .. "" ) local timer = setTimer ( actualizarJugadorOn , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end @3NAD اما اكواد التوب تايم كلنت سايد local Key = "F7" --- bind key HD = { gridlist = {}, S3D = {}, q = {} } function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end HD.wnd = guiCreateWindow(415, 146, 450, 505, "TOP Players", false) guiWindowSetSizable(HD.wnd, false) guiSetAlpha(HD.wnd, 1.00) guiSetProperty(HD.wnd, "CaptionColour", "FF200AF3") centerWindow(HD.wnd) HD.gridlist[1] = guiCreateGridList(18, 32, 430, 500, false, HD.wnd) local column = guiGridListAddColumn(HD.gridlist[1], "Rank", 0.20 ) -- Create a 'rank' column in the list local column1 = guiGridListAddColumn(HD.gridlist[1], "Player Name", 0.40 ) local column3 = guiGridListAddColumn(HD.gridlist[1], "Time", 0.30 ) -- Create a 'players' column in the list local column2 = guiGridListAddColumn(HD.gridlist[1], "Total Drift", 0.30 ) -- Create a 'Total Drift' column in the list for i = 1,30 do local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column3, "N/A", false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 0, 180, 255) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 0, 0) end guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) bindKey (Key, "down", function() guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) showCursor(guiGetVisible(HD.wnd)) triggerServerEvent("getTop", localPlayer) end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function updateTopList(name, top, i) local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, tostring(name), false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, convertNumber(top), false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 0, 180, 255) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 0, 0) end addEvent("updateTop", true) addEventHandler("updateTop", root, updateTopList) function update() guiGridListClear(HD.gridlist[1]) end addEvent("deltTop", true) addEventHandler("deltTop", root, update) سيرفر سايد drift_mejor = 0 addEventHandler( 'onResourceStart', getResourceRootElement(getThisResource()), function( ) executeSQLQuery( 'CREATE TABLE IF NOT EXISTS Drift_top_byS3Dd (Owner, Score, Name)' ) end ) function getPlayerFromNamePart(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end function createTopSystem( player ) if not isElement( player ) then return end local Top = {} local CreatTop = executeSQLQuery( "SELECT * FROM Drift_top_byS3Dd" ) for i = 1, #CreatTop do table.insert(Top,{name = CreatTop[i].Name,score = CreatTop[i].Score}) end if #CreatTop >0 then table.sort(Top, function(a,b) return (tonumber(a.score)or 0) > (tonumber(b.score)or 0) end) setTimer( function() for k, data in ipairs(Top) do if k == 1 then triggerClientEvent (player,"deltTop",player) end triggerClientEvent (player,"updateTop",player,tostring(data.name),tostring(data.score),tonumber(k)) if k == 30 then table.remove(Top) break end end end, 500, 1 ) end end function setAcontSqlData( player, top, name) if not isElement( player ) then return end if isGuestAccount ( getPlayerAccount ( player ) ) then return end result = executeSQLQuery("SELECT * FROM `Drift_top_byS3Dd` WHERE `Owner`=?", getAccountName(getPlayerAccount( player ))) if ( type ( result ) == "table" and #result == 0 ) or not result then executeSQLQuery( 'INSERT INTO Drift_top_byS3Dd( Owner, Score , Name) VALUES( ?, ?, ? )', getAccountName(getPlayerAccount( player )), top, name) else if tonumber ( top ) < tonumber( result[1]["Score"] ) then top = result[1]["Score"] else top = top end executeSQLQuery( 'UPDATE Drift_top_byS3Dd SET Score =?,Name =? WHERE Owner =?', top, name, getAccountName(getPlayerAccount( player ))) end end addEvent("driftNuevoRecord", true) addEventHandler("driftNuevoRecord", root, function(score, name) drift_mejor = score drift_nombre = getPlayerFromNamePart(name) setAcontSqlData( drift_nombre, drift_mejor, name) end ) addEventHandler("onElementDataChange",root, function (data) if ( data == "Best Drift" ) and getElementType(source) == "player" then local drift = getElementData(source,data) setAcontSqlData( source, tonumber(drift), string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "")) end end ) addEvent("getTop", true) addEventHandler("getTop", root, function() createTopSystem( source ) end ) @!#NssoR_)
  24. يا اخوان سويت كل اللي قلتوه ما زبط اما بالنسبه للاخ تنطيل معليش ما فهمت عليك لو تعطيني مثال اكون شاكر #Edit: هل في طريقه تجيبلي اسم اللاعب من الداتا حقت الاكونت حقه
  25. يب اخوي بس كل ما حاولت استخدمه يطلعلي النص nil مازبط + مو بس كذا الكود مو مزبوط يا اخوي ومشكور على مرورك واسف متعبك
×
×
  • Create New...