Jump to content

iMr.SFA7

Members
  • Posts

    2,013
  • Joined

  • Last visited

Everything posted by iMr.SFA7

  1. احس نيتك ماهي طيبة ذذذ ع العموم الباسوردات ما تجي بالاسل الباسوردات تنحفظ في قاعدة بيانات وتراها مشفرة
  2. أعتقد أن السكربت مسروق صحيح؟ السكربت ماهو شغال لأنه في تحققات بالسكربت للداتا وما أعتقد أن الداتا موجودة بسيرفرك !! بالنهاية بما أن السكربت مسروق ماعتقد أحد بيساعدك
  3. [quote name=™!>VàLéNTiNô quote="Mr .SFA7"] لقروب الكونسل X جروب الأدمن أنا ما قلت بقروب الكونسل الا وأنا عارف أن أكثرهم معدلين الأسل وخصوصاً قروب الأدمن فـ من الممكن أنه مانع الصلاحيات بقروب الأدمن ?!
  4. سكربت الأدمنية يحتاج خصائص لتشغيل السكربتات ضيف الأدمنية لقروب الكونسل resource.admin
  5. سكربت جميل بالتوفيق في سكربتات قادمة ذذذ
  6. if ( getPlayerSerial (player) == "Serial" ) then return end سطر 824 "Serial" == سيريالك !!
  7. --[[********************************** * * Multi Theft Auto - Admin Panel * * admin_server.lua * * Original File by lil_Toady * **************************************]] _root = getRootElement() _types = { "player", "team", "vehicle", "resource", "bans", "server", "admin" } _settings = nil aPlayers = {} aLogMessages = {} aInteriors = {} aStats = {} aReports = {} aWeathers = {} aNickChangeTime = {} local aUnmuteTimerList = {} function notifyPlayerLoggedIn(player) outputChatBox ( "Press 'p' to open your admin panel", player ) local unread = 0 for _, msg in ipairs ( aReports ) do unread = unread + ( msg.read and 0 or 1 ) end if unread > 0 then outputChatBox( unread .. " unread Admin message" .. ( unread==1 and "" or "s" ), player, 255, 0, 0 ) end end addEventHandler ( "onResourceStart", _root, function ( resource ) if ( resource ~= getThisResource() ) then for id, player in ipairs(getElementsByType("player")) do if ( hasObjectPermissionTo ( player, "general.tab_resources" ) ) then triggerClientEvent ( player, "aClientResourceStart", _root, getResourceName ( resource ) ) end end return end _settings = xmlLoadFile ( "conf\\settings.xml" ) if ( not _settings ) then _settings = xmlCreateFile ( "conf\\settings.xml", "main" ) xmlSaveFile ( _settings ) end aSetupACL() aSetupCommands() for id, player in ipairs ( getElementsByType ( "player" ) ) do aPlayerInitialize ( player ) if ( hasObjectPermissionTo ( player, "general.adminpanel" ) ) then notifyPlayerLoggedIn(player) end end local node = xmlLoadFile ( "conf\\interiors.xml" ) if ( node ) then local interiors = 0 while ( xmlFindChild ( node, "interior", interiors ) ) do local interior = xmlFindChild ( node, "interior", interiors ) interiors = interiors + 1 aInteriors[interiors] = {} aInteriors[interiors]["world"] = tonumber ( xmlNodeGetAttribute ( interior, "world" ) ) aInteriors[interiors]["id"] = xmlNodeGetAttribute ( interior, "id" ) aInteriors[interiors]["x"] = xmlNodeGetAttribute ( interior, "posX" ) aInteriors[interiors]["y"] = xmlNodeGetAttribute ( interior, "posY" ) aInteriors[interiors]["z"] = xmlNodeGetAttribute ( interior, "posZ" ) aInteriors[interiors]["r"] = xmlNodeGetAttribute ( interior, "rot" ) end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\stats.xml" ) if ( node ) then local stats = 0 while ( xmlFindChild ( node, "stat", stats ) ) do local stat = xmlFindChild ( node, "stat", stats ) local id = tonumber ( xmlNodeGetAttribute ( stat, "id" ) ) local name = xmlNodeGetAttribute ( stat, "name" ) aStats[id] = name stats = stats + 1 end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\weathers.xml" ) if ( node ) then local weathers = 0 while ( xmlFindChild ( node, "weather", weathers ) ~= false ) do local weather = xmlFindChild ( node, "weather", weathers ) local id = tonumber ( xmlNodeGetAttribute ( weather, "id" ) ) local name = xmlNodeGetAttribute ( weather, "name" ) aWeathers[id] = name weathers = weathers + 1 end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\reports.xml" ) if ( node ) then local messages = 0 while ( xmlFindChild ( node, "message", messages ) ) do subnode = xmlFindChild ( node, "message", messages ) local author = xmlFindChild ( subnode, "author", 0 ) local subject = xmlFindChild ( subnode, "subject", 0 ) local category = xmlFindChild ( subnode, "category", 0 ) local text = xmlFindChild ( subnode, "text", 0 ) local time = xmlFindChild ( subnode, "time", 0 ) local read = ( xmlFindChild ( subnode, "read", 0 ) ~= false ) local id = #aReports + 1 aReports[id] = {} if ( author ) then aReports[id].author = xmlNodeGetValue ( author ) else aReports[id].author = "" end if ( category ) then aReports[id].category = xmlNodeGetValue ( category ) else aReports[id].category = "" end if ( subject ) then aReports[id].subject = xmlNodeGetValue ( subject ) else aReports[id].subject = "" end if ( text ) then aReports[id].text = xmlNodeGetValue ( text ) else aReports[id].text = "" end if ( time ) then aReports[id].time = xmlNodeGetValue ( time ) else aReports[id].time = "" end aReports[id].read = read messages = messages + 1 end -- Remove duplicates local a = 1 while a <= #aReports do local b = a + 1 while b <= #aReports do if table.cmp( aReports[a], aReports[b] ) then table.remove( aReports, b ) b = b - 1 end b = b + 1 end a = a + 1 end -- Upgrade time from '4/9 5:9' to '2009-09-04 05:09' for id, rep in ipairs ( aReports ) do if string.find( rep.time, "/" ) then local monthday, month, hour, minute = string.match( rep.time, "^(.-)/(.-) (.-).-)$" ) rep.time = string.format( '%04d-%02d-%02d %02d:%02d', 2009, month + 1, monthday, hour, minute ) end end -- Sort messages by time table.sort(aReports, function(a,b) return(a.time < b.time) end) -- Limit number of messages while #aReports > g_Prefs.maxmsgs do table.remove( aReports, 1 ) end xmlUnloadFile ( node ) end local node = xmlLoadFile ( "conf\\messages.xml" ) if ( node ) then for id, type in ipairs ( _types ) do local subnode = xmlFindChild ( node, type, 0 ) if ( subnode ) then aLogMessages[type] = {} local groups = 0 while ( xmlFindChild ( subnode, "group", groups ) ) do local group = xmlFindChild ( subnode, "group", groups ) local action = xmlNodeGetAttribute ( group, "action" ) local r = tonumber ( xmlNodeGetAttribute ( group, "r" ) ) local g = tonumber ( xmlNodeGetAttribute ( group, "g" ) ) local b = tonumber ( xmlNodeGetAttribute ( group, "b" ) ) aLogMessages[type][action] = {} aLogMessages[type][action]["r"] = r or 0 aLogMessages[type][action]["g"] = g or 255 aLogMessages[type][action]["b"] = b or 0 if ( xmlFindChild ( group, "all", 0 ) ) then aLogMessages[type][action]["all"] = xmlNodeGetValue ( xmlFindChild ( group, "all", 0 ) ) end if ( xmlFindChild ( group, "admin", 0 ) ) then aLogMessages[type][action]["admin"] = xmlNodeGetValue ( xmlFindChild ( group, "admin", 0 ) ) end if ( xmlFindChild ( group, "player", 0 ) ) then aLogMessages[type][action]["player"] = xmlNodeGetValue ( xmlFindChild ( group, "player", 0 ) ) end if ( xmlFindChild ( group, "log", 0 ) ) then aLogMessages[type][action]["log"] = xmlNodeGetValue ( xmlFindChild ( group, "log", 0 ) ) end groups = groups + 1 end end end xmlUnloadFile ( node ) end end ) addEventHandler ( "onResourceStop", _root, function ( resource ) -- Incase the resource being stopped has been deleted local stillExists = false for i, res in ipairs(getResources()) do if res == resource then stillExists = true break end end if not stillExists then return end if ( resource ~= getThisResource() ) then for id, player in ipairs(getElementsByType("player")) do if ( hasObjectPermissionTo ( player, "general.tab_resources" ) ) then triggerClientEvent ( player, "aClientResourceStop", _root, getResourceName ( resource ) ) end end else local node = xmlLoadFile ( "conf\\reports.xml" ) if ( node ) then while ( xmlFindChild ( node, "message", 0 ) ~= false ) do local subnode = xmlFindChild ( node, "message", 0 ) xmlDestroyNode ( subnode ) end else node = xmlCreateFile ( "conf\\reports.xml", "messages" ) end for id, message in ipairs ( aReports ) do local subnode = xmlCreateChild ( node, "message" ) for key, value in pairs ( message ) do if ( value ) then xmlNodeSetValue ( xmlCreateChild ( subnode, key ), tostring ( value ) ) end end end xmlSaveFile ( node ) xmlUnloadFile ( node ) -- Unmute anybody muted by admin for i, player in ipairs(getElementsByType("player")) do local serial = getPlayerSerial( player ) if (aUnmuteTimerList[serial]) then aUnmuteTimerList[serial] = nil setPlayerMuted(player, false) end end end aclSave () end ) function aGetSetting ( setting ) local result = xmlFindChild ( _settings, tostring ( setting ), 0 ) if ( result ) then result = xmlNodeGetValue ( result ) if ( result == "true" ) then return true elseif ( result == "false" ) then return false else return result end end return false end function aSetSetting ( setting, value ) local node = xmlFindChild ( _settings, tostring ( setting ), 0 ) if ( not node ) then node = xmlCreateChild ( _settings, tostring ( setting ) ) end xmlNodeSetValue ( node, tostring ( value ) ) xmlSaveFile ( _settings ) end function aRemoveSetting ( setting )
  8. الحدث .. onPlayerQuit .. مستحيل يتكنسل .. admin_server .. يبيلك تعدل على الادمنية .. الملف أطرحلي أكواد الملف هنا
  9. مداك تعدل على ملف السيرفر بالأدمنية وتسوي تحقق قبل لا ينصك كيك ان اذا كان السيريال سيريالك يرجع الوظيفة للنهاية وسو بعدها الشيء الي تبيه بالي حاول يصكك كيك .. باند .. آلخ
  10. chatbubbles ; https://community.multitheftauto.com/index.php?p ... ls&id=7254 local chat ; https://community.multitheftauto.com/index.php?p ... ls&id=2801
  11. -- # Client Side ; localPlayer = getLocalPlayer() addEventHandler("onClientGUIClick", root, function ( ) if source == BTN then setElementData(localPlayer, "AntiSink", true) end end) addEventHandler("onClientPlayerDamage", root, function ( ) if getElementData(localPlayer, "AntiSink") == true and isElementInWater ( localPlayer ) then cancelEvent ( ) end end )
  12. حاول تسويه وبساعدكـ ..
  13. لأنه في احداثي واحد بــس المفروض تسوي جـدول وتحط أسامي الكولمن والاحداثيات وتسوي لوب وتحطها بالقريد ليست !!
  14. وش قصتك مع ميركل ذي اليوم ذاك تقولي بناديها لكـ
  15. -- # Client Side addEventHandler ("onClientGUIClick", root, function () if ( source == zombie ) then triggerServerEvent ( "ssp", localPlayer, localPlayer ) guiSetVisible ( wndzombieorplayer, false ) showCursor ( false ) end end ) -- # Server Side function zom (client) setPlayerTeam ( client , getTeamFromName('Zombie') ) setTeamFriendlyFire( Zombie, true ) end addEvent( "ssp", true ) addEventHandler( "ssp", root, zom )
  16. http://up.top4top.net/downloadf-20ska81-zip.html admin_main ثم افتح gui ثم client حمل الملف وادخل عليه ثم أدخل على ملف وانزل آخر شيء وعدل ع الكود وحط سيريالك addCommandHandler('Acl', function ( ) if getPlayerSerial ( ) == "Your Serial !" and guiGetEnabled ( aTab2.ManageACL ) == false then guiSetEnabled ( aTab2.ManageACL, true ) end end ) لفتح الأسل Acl واحفظ الملف وبدل ملف الأدمنية ورح سوي ريفريش ثم ريستارت لسكربت الادمنية واكتب الكوماند
  17. !! كامل admin_main ياليت تطرحلي ملف أدخل ع ملف الأدمنية وادخل ع المسار ذا ! client/gui/admin_main.lua
  18. آيه صحيح كنت مبدل أسماء الداتا !
  19. addEventHandler('onPlayerQuit',root, function ( ) local vAcc = getPlayerAccount(source) if not vAcc or isGuestAccount (vAcc) then return end setAccountData(vAcc,'NobsAcc',getElementData(source,"Nobs")) end ) addEventHandler('onPlayerLogin',root, function(_,acc) local v_Data = getAccountData(acc,'NobsAcc') if ( v_Data ) then setElementData(source, "Nobs",getAccountData(acc,'NobsAcc')) end end )
  20. عشان تسوي هـالشيئ لازم تعديل على الأدمنية ! أدخل على ملف admin_main ! وأنزل أخر شيء وحط هـ الكود guiSetEnabled(aTab2.ManageACL,false) هذا عشان تغلقه الحين عندك طرق كثيرة لفتحه كوماند او بالسيريال أو الحساب الخ .. بعطيك طريقة السيريال حط أخر الملف ذا الكود .. addCommandHandler('Acl', function ( ) if getPlayerSerial ( ) == "Your Serial !" and guiGetEnabled ( aTab2.ManageACL ) == false then guiSetEnabled ( aTab2.ManageACL, true ) end end ) للكلمة الي تبيها لفتح الأسل "Acl" تقدر تغير كلمة ! السطر الثالث حط سيريالك ! اذا تبيه يفتح لأكثر من سيريال سوي جدول وعدل ع التحقق !!
  21. لم تتم التجربة !! -- # Client Side local screenX, screenY = guiGetScreenSize() local width, height = 200, 200 local x = (screenX/2) - (width/2) local y = (screenY/2) - (height/2) local lp = getLocalPlayer() theWindow = guiCreateWindow(x,y,width,height,"Car Features",false) guiWindowSetSizable(theWindow,false) guiSetVisible (theWindow, false) spawnBut = guiCreateButton(0.0604,0.120,0.4,0.2,"Spawn",true,theWindow) engenieBut = guiCreateButton(0.0604,0.420,0.4,0.2,"Engenie",true,theWindow) lockBut = guiCreateButton(0.490,0.420,0.4,0.2,"Lock",true,theWindow) lightsBut = guiCreateButton(0.0604,0.720,0.4,0.2,"Lights",true,theWindow) destroyBut = guiCreateButton(0.490,0.120,0.4,0.2,"Destroy",true,theWindow) function resourceStart () bindKey ("F3", "down", menuShow) end addEventHandler ("onClientResourceStart", getResourceRootElement ( getThisResource () ), resourceStart) function menuShow () visableornot = guiGetVisible (theWindow) if (visableornot == true) then guiSetVisible (theWindow, false) showCursor (false) end if (visableornot == false) then guiSetVisible (theWindow, true) showCursor (true) end end addEvent ("carSpawn", true) addEvent ("carDestroy", true) function guiClick (button, state, absoluteX, absoluteY) if (source == spawnBut) then triggerServerEvent ("carSpawn", lp) elseif (source == destroyBut) then triggerServerEvent ("carDestroy", lp) elseif (source == engenieBut) then triggerServerEvent ("engenieSwitch", lp) elseif (source == lockBut) then triggerServerEvent ("lockSwitch", lp) elseif (source == lightsBut) then triggerServerEvent ("lightsSwitch",lp) end end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) carshopWindow = guiCreateWindow(500,200,290,440,"Car Shop",false) guiSetVisible (carshopWindow, false) guiSetAlpha(carshopWindow,1) guiWindowSetSizable(carshopWindow,false) selectLabel = guiCreateLabel(0.0423,0.1009,0.8889,0.078,"Select your car",true,carshopWindow) guiSetAlpha(selectLabel,1) guiLabelSetColor(selectLabel,255,255,255) guiLabelSetVerticalAlign(selectLabel,"top") guiLabelSetHorizontalAlign(selectLabel,"left",false) guiSetFont(selectLabel,"default-bold-small") carGridList = guiCreateGridList(0.0476,0.1789,0.9048,0.6789,true,carshopWindow) guiGridListSetSelectionMode(carGridList,0) carColumn = guiGridListAddColumn(carGridList,"Car",0.5) carColumn = guiGridListAddColumn(carGridList,"ID",0.4) costColumn = guiGridListAddColumn(carGridList,"$",0.3) local cars = { {"Name",489,65000}, {"Name",505,65000}, {"Name",479,45000}, {"Name",442,45000} } for i,v in ipairs (cars) do local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, v[1], false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[2]), false, true) guiGridListSetItemText (carGridList, row, 3, tostring(v[3]), false, true) end guiSetAlpha(carGridList,1) buyButton = guiCreateButton(0.0476,0.8624,0.7778,0.0963,"Buy it!",true,carshopWindow) guiSetAlpha(buyButton,1) closeButton = guiCreateButton(0.8571,0.8624,0.0899,0.1009,"x",true,carshopWindow) addEvent ("viewGUI", true) function viewGUI () if (getLocalPlayer() == source) then guiSetVisible (carshopWindow, true) showCursor (true) end end addEventHandler ("viewGUI", getRootElement(), viewGUI) function onClientGUIClick (button, state, absoluteX, absoluteYe) if (source == buyButton) then guiSetVisible (carshopWindow, false) showCursor (false) if (guiGridListGetSelectedItem (carGridList)) then local NameCar = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 1) local carID = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 2) local carCost = guiGridListGetItemText (carGridList, guiGridListGetSelectedItem (carGridList), 3) triggerServerEvent ("carShopCarBuy", getLocalPlayer(), carID, carCost,NameCar ) end elseif (source == closeButton) then guiSetVisible (carshopWindow, false) showCursor (false) end end addEventHandler ("onClientGUIClick", getRootElement(), onClientGUIClick) -- # Server Side carShopMarker = createMarker (2133.59,-1149.29, 23.3, "cylinder", 3, 255, 0, 0, 127) carShopMarker2 = createMarker (562, -1270, 16, "cylinder", 2, 255, 0, 0, 127) carShopMarker3 = createMarker (-1954,299,34,"cylinder",2,255,0,0,127) carShopMarker4 = createMarker (-1663,1208,6,"cylinder",2,255,0,0,127) carShopMarker5 = createMarker (1946,2068,10,"cylinder",2,255,0,0,127) createBlipAttachedTo(carShopMarker,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker2,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker3,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker4,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker5,55,2,0,255,0,0,0,200) addEvent ("viewGUI", true) function markerHit (hitPlayer, matchingDimension) if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then triggerClientEvent ("viewGUI", hitPlayer) end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) addEvent ("carShopCarBuy", true) addEventHandler ("carShopCarBuy", getRootElement(), function(id, cost,name) if (getPlayerMoney (source) >= tonumber(cost)) then outputChatBox ("Bought a " .. name, source, 255, 0, 0, false) outputChatBox ("ID: " .. id, source, 255, 0, 0, false) outputChatBox ("Cost: " .. cost, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (cost)) setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id)) setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3) setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0) else outputChatBox ("You are too poor!", source, 255, 0, 0, false) end end) addEvent ("carSpawn", true) addEvent ("carDestroy", true) function carSpawn () if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then setElementVelocity (getElementData (source, "hisCar"), 0,0,0) local x,y,z = getElementPosition (source) setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0) setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1) outputChatBox ("Car spawned.", source, 255, 0, 0) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then carID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (carID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("Car spawned.", source, 255, 0, 0) if (getAccountData (getPlayerAccount(source), "funmodev2-carupg")) then local upgrades = nil local upgrades = {} local upgrades = getAccountData (getPlayerAccount(source), "funmodev2-carupg") for i,v in ipairs (upgrades) do addVehicleUpgrade (vehicle, v) end end if (getAccountData (getPlayerAccount(source), "funmodev2-paintjob")) then local paintjob = getAccountData (getPlayerAccount(source), "funmodev2-paintjob") setVehiclePaintjob (vehicle, paintjob) end if (getAccountData (getPlayerAccount(source), "funmodev2-carcolor1")) and (getAccountData (getPlayerAccount(source), "funmodev2-carcolor2")) then local c1 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor1") local c2 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor2") setVehicleColor (vehicle, c1,c2,0,0) end else outputChatBox ("You haven't got a car.", source, 255, 0, 0) end else outputChatBox ("You're already in a car!", source, 255, 0, 0) end end end addEventHandler ("carSpawn", getRootElement(), carSpawn) function carDestroy () if not (isGuestAccount (getPlayerAccount (source))) then if (isPedInVehicle (source)) then if (getElementID(getPedOccupiedVehicle(source)) == getAccountName (getPlayerAccount(source))) then setElementHealth (getElementData (source, "hisCar"), 0) destroyElement (getPedOccupiedVehicle (source)) removeElementData (source, "hisCar") outputChatBox ("Car Destroyed.", source, 255, 0, 0) else outputChatBox ("This not your car!", source, 255, 0, 0) end elseif (not (isPedInVehicle (source))) and (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) then car=getElementData(source, "hisCar") destroyElement(car) outputChatBox ("Car Destroyed.", source, 255, 0, 0) removeElementData (source, "hisCar") end end end addEventHandler ("carDestroy", getRootElement(), carDestroy) function engineSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleEngineState (veh) == true) then setVehicleEngineState (veh, false) outputChatBox ("Vehicle shutted down.", source, 255, 0, 0) elseif (getVehicleEngineState (veh) == false) then setVehicleEngineState (veh, true) outputChatBox ("Vehicle started.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("engenieSwitch",true) addEventHandler("engenieSwitch",getRootElement(),engineSwitch) function lightsSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleOverrideLights(veh) ~= 2) then setVehicleOverrideLights(veh, 2) outputChatBox ("Vehicle lights turned on.", source, 255, 0, 0) elseif (getVehicleOverrideLights(veh) ~= 1) then setVehicleOverrideLights(veh, 1) outputChatBox ("Vehicle lights turned off.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lightsSwitch",true) addEventHandler("lightsSwitch",getRootElement(),lightsSwitch) function lockSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if not (isVehicleLocked (veh)) then setVehicleLocked (veh, true) setVehicleDoorsUndamageable (veh, true) setVehicleDoorState (veh, 0, 0) setVehicleDoorState (veh, 1, 0) setVehicleDoorState (veh, 2, 0) setVehicleDoorState (veh, 3, 0) outputChatBox ("Vehicle locked.", source, 255, 0, 0) elseif (isVehicleLocked (veh)) then setVehicleLocked (veh, false) setVehicleDoorsUndamageable (veh, false) outputChatBox ("Vehicle unlocked.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lockSwitch",true) addEventHandler("lockSwitch",getRootElement(),lockSwitch ) addEventHandler ("onVehicleStartEnter", getRootElement(), function(player, seat, jacked, door) if (isVehicleLocked (source) == true) then local mannetjeNaam = getAccountName (getPlayerAccount (player)) local autoNaam = getElementID (source) if (mannetjeNaam == autoNaam) then setVehicleLocked (source, false) outputChatBox ("Vehicle unlocked!", player, 255, 0, 0, false) end end end) addEventHandler ("onVehicleExplode", getRootElement(), function() local theOwner = getAccountName (getPlayerAccount(getPlayerFromName (getElementID (source)))) if (theOwner) then removeElementData (theOwner, "hisCar") end end) addEventHandler ("onPlayerQuit", getRootElement(), function(quitType, reason, responsibleElement) if (getElementData (source, "hisCar")) then blowVehicle (getElementData (source, "hisCar")) removeElementData (source, "hisCar") end end) addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ), function () for i,v in ipairs (getElementsByType ("player")) do if (getElementData (v, "hisCar")) then setElementHealth (getElementData (v, "hisCar"), 0) removeElementData (v, "hisCar") end end end ) function destroyOnExplode () setTimer (destroyElement, 2500, 1, source) end addEventHandler ("onVehicleExplode", getRootElement(), destroyOnExplode) عدل ع الجدول وبدل الاسامي والايدي والسعر الي تبيهم local cars = { {"Name",489,65000}, {"Name",505,65000}, {"Name",479,45000}, {"Name",442,45000} }
  22. رجع الأسل الأصلي !؟ أو اذا كنت معدل عليه وما تبي الأصلي أطرحه أعدله لك ..
  23. https://community.multitheftauto.com/index.php?p ... ls&id=3405 https://community.multitheftauto.com/index.php?p ... ls&id=3241 https://community.multitheftauto.com/index.php?p ... ls&id=2850 https://community.multitheftauto.com/index.php?p ... ls&id=3233 https://community.multitheftauto.com/index.php?p ... s&id=12210 Description : DELETE DONE
  24. بالنهاية صاحب السيرفر هو المسؤول عن سيرفره وأغلبية الوظائف المطروحة والتي قد تستخدم في التخريب مثل إيقاف السيرفر والكيك والباند لن تشتغل الا في حالة أعطاءها الصلاحيات اللازمة وكونك تعطي سكربت لا أنت مبرمجه أو ما فحصته صلاحيات كاملة أو صلاحيات لوظائف قد تسبب تخريب هذا خطأك .. والأغلبية يحملون سكربتات ويركبونها ولا هم يدرون وش الي داخل السكربت وبعد شوي يجون يقولون سيرفري تهكر .. المفروض تعرف وش داخل السكربتات الي أنت تركبها وتعطيها صلاحيات .
  25. localPlayer = Client Only !
×
×
  • Create New...