Jump to content

Max+

Members
  • Posts

    1,363
  • Joined

  • Last visited

Everything posted by Max+

  1. هات الكود .. اذا طويل مره ارفع السكربت على موقع رفع وحط الرابط .
  2. تأكد الكود اللي سواه لك زاحف يكون في c.lua + اكتب بالسيرفر بعد ماتشتغل المود وتخش بالادمنية . . /debugscript 3 وراح يطلع لك نافذة صغيرة بها اخطاء . . اكتبها هنا
  3. ماشاء الله , وين الصورة في الملف ؟ غير name لاسم الصورة . .
  4. طيب ياليت تطرح لنا meta.xml + اذا شغلت المود /debugscript 3 شوف وش يطلع لك من اخطاء واكتبها هنا . .
  5. guiCreateProgressBar guiProgressBarGetProgress guiProgressBarSetProgress + dxDrawImage
  6. local x, y, z = getElementPosition( marker ) ----مو معرف وين الماركر ؟ كيف تجيب احداثيات ماركر وهي مو موجودة بالكود ؟ لازم تحط كود حق صنع الماركر مع السكربت ذا + تأكد من ملف الميتأ انه اسم الصورة زي ماهو بالكود + يكون كلينت + لايكون حاط الصورة بمجلد لانه بالسكربت لازم بدون مجلد . .
  7. affirmative VS negative
  8. --ServerSide , local countries = { [ "PT" ] = true } local serials = { [ "B1E80345047CC71F1F5C427C581C4D94" ] = true } function paises ( ) local gCountry = exports.admin:getPlayerCountry ( source ) or "N/A" local gSerial = getPlayerSerial ( source ) if ( serials [ gSerial ] ) then outputChatBox("welcome mike",source) elseif ( countries [gCountry] ) then kickPlayer ( source, "Country not allowed." ) end end addEventHandler ( "onPlayerJoin", getRootElement(), paises ) Make sure you add the resource in acl admin .
  9. # زاحف بتفرق ؟ + متى استخدام الروت والرسويس روت بنظرك ؟
  10. ابي افهم وش مسوي انت ؟ .. ليه تريقر من سيرفر لكلنت ؟ اذا يبي يستخدمه كـــ كستوم افنت , مو شرط افنت معروف يعني تريقر . . مثلا زر او امر .. الخ
  11. طيب وانا انا ضبطتك : (
  12. --- جرب , addCommandHandler( "POS", function ( ) local x, y, z, xl, yl, zl = getCameraMatrix( ) if ( x == 0 or y == 0 or z == 0 ) then return end outputChatBox (" "..x..", "..y..", "..z..", "..xl..", "..yl..", "..zl.." ") end )
  13. بالنسبة لحرف السمول عدلته اما سطر 29 عادي مافيه شي . . مو شرط
  14. --- مثال addEvent ( 'Join', true ) addEventHandler( 'Join', resourceRoot, function ( ) setCameraMatrix(-911.46545410156, 1931.513671875,130.02493286133, -392.18316650391, 1589.7071533203, 101.35176849365) end ) --- تريقر triggerClientEvent (source, "Join", source)
  15. ماتوقع . . ذي حركة حلوه من mta عشان ماتقدر تعدي الباند اذا اخذت باند بنسخة 1.3 وتبي تستبدل السيريال بــ نسخة 1.4 ماتقدر تستبدل السيريال بالنسخة القديمه لانه يستخدم سيريال اخر نفس الهاردسك بس يغير كم حرف منه . . تلقائيا
  16. [quote name=..&G:..]Yes I tried, and it still doesn't show nothing, not even an error... Hope this works , CarNames = {[603] = "Shelby",[474] = "Mercedes E500", [411] = "Lamborghini Veneno"} addEventHandler( 'onVehicleEnter', resourceRoot, function ( ) outputChatBox("You have entered " .. findVehicleName(getElementModel(source))) end ) function findVehicleName(theVehicle) return CarNames[theVehicle] end --ServerSide ,
  17. ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------ ------ ------|Arrest System|------ ------ ------ ------ ------- ------- ------- ------- ------- ------- ------- ------- ------- local Display = textCreateDisplay() local Text1 = textCreateTextItem("Press H to jail the Arrested.", 0.5, 0.35, "high", 255, 255, 0, 255, 2, "center", "center", 255) textDisplayAddText(Display, Text1) local ArrestTimer = {} addEvent("setWantLevel", true) addEventHandler("setWantLevel", root, function(wL) local LegalStatus = getElementData(source, "LegalStatus") if LegalStatus ~= "Jailed" then setPlayerWantedLevel(source, wL) end end) addEvent("takeMoney", true) addEventHandler("takeMoney", root, function(amount) takePlayerMoney(source, amount) end) addEvent("warpPosAndIntAndDim", true) addEventHandler("warpPosAndIntAndDim", root, function(type, value, x, y ,z) local Cop = getElementData(source, "ArresterCop") if isElement(Cop) and not isPedInVehicle(source) then if type == "INT" then setElementInterior(source, value) elseif type == "DIM" then setElementDimension(source, value) end setElementPosition(source, x, y ,z) end end) addEvent("backMeToJail", true) addEventHandler("backMeToJail", root, function() local gDoors = gDoors[math.random(1, #gDoors-3)] local x, y, z, r = gDoors["JPosX"], gDoors["JPosY"], gDoors["JPosZ"], gDoors["JRot"] setElementPosition(source, x, y, z) setPedRotation(source, r) setElementInterior(source, 6) end) addEventHandler("onPlayerDamage", root, function(attacker, wp) if wp == 41 then return end if attacker and attacker ~= source then if getElementInterior(attacker) == 5 and getElementDimension(attacker) == 5 then return end if (getElementData ( source, "isPlayerKidnapped" )) then return end if getElementType(attacker) == "vehicle" then attacker = getVehicleController(attacker) end local attakerTeam = getPlayerTeam(attacker) local damagedTeam = getPlayerTeam(source) if attakerTeam and damagedTeam then if getTeamName(attakerTeam) ~= "Police" and getTeamName(attakerTeam) ~= "Military" then if getTeamName(damagedTeam) ~= "Police" and getTeamName(damagedTeam) ~= "Military" then local wL = getPlayerWantedLevel(attacker) if wL < 3 then for i, player in ipairs(getElementsByType("player")) do local team = getPlayerTeam(player) if team and getTeamName(team) == "Police" and getTeamName(team) == "Military" then local x1, y1, z1 = getElementPosition(attacker) local x2, y2, z2 = getElementPosition(player) local LegalStatus = getElementData(attacker, "LegalStatus") if LegalStatus ~= "Jailed" and getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) < 15 then setPlayerWantedLevel(attacker, 3) break end end end end else local wL = getPlayerWantedLevel(attacker) local LegalStatus = getElementData(attacker, "LegalStatus") if LegalStatus ~= "Jailed" and wL < 4 then setPlayerWantedLevel(attacker, 4) end end else local wL = getPlayerWantedLevel(source) local LegalStatus = getElementData(source, "LegalStatus") if getTeamName(attakerTeam) == "Police" and getTeamName(attakerTeam) == "Military" and wL >= 3 and wp == 3 and not isPedDead(source) and LegalStatus ~= "Arrested" and LegalStatus ~= "Jailed" then setElementData(source, "ArresterCop", attacker) setElementData(source, "LegalStatus", "Arrested") showCursor(source, true) toggleAllControls(source, false, true, false) ArrestTimer[source] = setTimer(sendToJail, 40000, 1, source) if isKeyBound(source, "tab", "down", HackPoliceComputer) then unbindKey(source, "tab", "down", HackPoliceComputer) end if (getElementData(source, "HackTime") or 0) > 0 then setElementData(source, "HackTime", false) setElementFrozen(source, false) exports.TopBarChat:sendClientMessage(getPlayerName(source).." failed to hack the police pc", root, 255, 0, 0) if isTimer(HackTimer) then killTimer(HackTimer) end end exports.TopBarChat:sendClientMessage("You Arrested "..getPlayerName(source).."!", attacker, 0, 255, 0) exports.TopBarChat:sendClientMessage("You have been Arrested by "..getPlayerName(attacker).."!", source, 255, 255, 0) setPedAnimation(source, "ROB_BANK", "SHP_HandsUp_Scr", false, false) setPedAnimation(attacker, "ped", "ARRESTgun", false, false) setTimer(function(arrested, attacker) setPedAnimation(arrested, false) setPedAnimation(attacker, false) end, 2500, 1, source, attacker) end end end end end) addEventHandler("onPlayerWasted", root, function(_, killer) if isKeyBound(source, "tab", "down", HackPoliceComputer) then unbindKey(source, "tab", "down", HackPoliceComputer) end if (getElementData(source, "HackTime") or 0) > 0 then setElementData(source, "HackTime", false) exports.TopBarChat:sendClientMessage(getPlayerName(source).." failed to hack the police pc", root, 255, 0, 0) if isTimer(HackTimer) then killTimer(HackTimer) end end if killer and killer ~= source then local killerTeam = getPlayerTeam(killer) local killedTeam = getPlayerTeam(source) local wL = getPlayerWantedLevel(killer) local LegalStatus = getElementData(killer, "LegalStatus") if killerTeam and killedTeam then if getTeamName(killerTeam) ~= "Police" and getTeamName(killerTeam) ~= "Military" then if getTeamName(killedTeam) ~= "Police" and getTeamName(killedTeam) ~= "Military" then if LegalStatus ~= "Jailed" and (wL < 4) then setPlayerWantedLevel(killer, 4) end else if LegalStatus ~= "Jailed" and (wL <= 5) and not (wL > 6) then setPlayerWantedLevel(killer, wL+1) end end else local wL = getPlayerWantedLevel(source) local LegalStatus = getElementData(source, "LegalStatus") if wL >= 3 and LegalStatus ~= "Arrested" and LegalStatus ~= "Jailed" then setElementData(source, "ArresterCop", killer) sendToJail(source) end end end end if not killer or killer == source or getElementType(killer) == "vehicle" then local wL = getPlayerWantedLevel(source) local LegalStatus = getElementData(source, "LegalStatus") if wL >= 4 and LegalStatus ~= "Jailed" then for i, player in ipairs(getElementsByType("player")) do local team = getPlayerTeam(player) if team and getTeamName(team) == "Police" and getTeamName(team) == "Military" then local x1, y1, z1 = getElementPosition(source) local x2, y2, z2 = getElementPosition(player) if getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) < 40 then sendToJail(source) break end end end end end for i, player in ipairs(getElementsByType("player")) do if (getElementData(player, "ArresterCop") == source) then freePrisoner(player) exports.TopBarChat:sendClientMessage("You escaped from the cop!", player, 255, 255, 0) end end end) addEventHandler("onPlayerTarget", root, function(player) if getControlState(source, "aim_weapon") and player and getElementType(player) == "player" then local targetTeam = getPlayerTeam(player) local sourceTeam = getPlayerTeam(source) local LegalStatus = getElementData(source, "LegalStatus") local x1, y1, z1 = getElementPosition(source) local x2, y2, z2 = getElementPosition(player) if targetTeam and getTeamName(targetTeam) == "Police" and getTeamName(targetTeam) == "Military" and sourceTeam ~= targetTeam then if LegalStatus ~= "Arrested" and LegalStatus ~= "Jailed" then local wp = getPedWeapon(source) local wL = getPlayerWantedLevel(source) if wL < 2 and wp ~= 41 then if getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) < 10 then setPlayerWantedLevel(source, 2) end end end end if sourceTeam and getTeamName(sourceTeam) == "Police" and getTeamName(sourceTeam) == "Military" and sourceTeam ~= targetTeam then local LegalStatus = getElementData(player, "LegalStatus") if LegalStatus ~= "Arrested" and LegalStatus ~= "Jailed" then local wL = getPlayerWantedLevel(player) local currentgun = getPedWeapon(source) if getElementInterior(source) == 5 and getElementDimension(source) == 5 then return end if (getElementData ( player, "isPlayerKidnapped" )) then return end if not isPedDead(player) and (currentgun > 19) and (currentgun < 39) and (wL > 2) and (getElementHealth(player) <= 50) and getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) < 3 then setElementData(player, "ArresterCop", source) setElementData(player, "LegalStatus", "Arrested") showCursor(player, true) toggleAllControls(player, false, true, false) ArrestTimer[player] = setTimer(sendToJail, 40000, 1, player) exports.TopBarChat:sendClientMessage("You Arrested "..getPlayerName(player).."!", source, 0, 255, 0) exports.TopBarChat:sendClientMessage("You have been Arrested by "..getPlayerName(source).."!", player, 255, 0, 0) setPedAnimation(player, "ROB_BANK", "SHP_HandsUp_Scr", false, false) setPedAnimation(source, "ped", "ARRESTgun", false, false) if isKeyBound(source, "tab", "down", HackPoliceComputer) then unbindKey(source, "tab", "down", HackPoliceComputer) end if (getElementData(player, "HackTime") or 0) > 0 then setElementData(player, "HackTime", false) setElementFrozen(player, false) exports.TopBarChat:sendClientMessage(getPlayerName(player).." failed to hack the police pc", root, 255, 0, 0) if isTimer(HackTimer) then killTimer(HackTimer) end end setTimer(function(arrested, attacker) setPedAnimation(arrested, false) setPedAnimation(attacker, false) end, 3000, 1, player, source) end end end end end) addEventHandler("onPlayerQuit", root, function() if isTimer(ArrestTimer[source]) then killTimer(ArrestTimer[source]) ArrestTimer[source] = nil end if bribeTimer[source] then bribeTimer[source] = nil end local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local LegalStatus = getElementData(source, "LegalStatus") local BailAmount = getElementData(source, "BailAmount") or 0 local JailTime = getElementData(source, "JailTime") or 0 local wL = getPlayerWantedLevel(source) or 0 if LegalStatus == "Free" or LegalStatus == false then setAccountData(account, "LegalStatus", "Free") setAccountData(account, "BailAmount", false) setAccountData(account, "JailTime", false) setAccountData(account, "wL", wL) elseif LegalStatus == "Arrested" then setAccountData(account, "LegalStatus", "Jailed")
  18. you can , use more than one way .. First # --ClientSide addEventHandler ( 'onClientPlayerWeaponFire', resourceRoot, function (nWeapon) if ( getElementData ( localPlayer, 'NoGrenades' == false ) and nWeapon == 16 ) then cancelEvent ( ) outputChatBox ( '* Using Grenades Are Not Allowed Here * ' , 255, 0, 0 ) end end ) if the intro - clientSide , then setElementData ( localPlayer ,'NoGrenades', false ) if it was serverside use , setElementData ( source ,'NoGrenades', false ) second # ID = { 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 } addEventHandler ( 'onClientPlayerWeaponFire', resourceRoot, function (nWeapon ) for _, v in ipairs (ID) do if ( getElementInterior (v ) and (nWeapon ) == 16 ) then cancelEvent ( ) outputChatBox ( '* Using Grenades Are Not Allowed Here * ' , 255, 0, 0 ) end end end ) Replace the ids, with your interior ids , Third # --ClientSide addEventHandler( 'onClientPlayerWeaponSwitch', root, function ( ) if ( getPedWeapon(localPlayer ) == 17 ) and getElementInterior(localPlayer) ~= 0 then toggleControl ( "fire", false ) else toggleControl ( "fire", true ) end end )
  19. stupid answers ? your the one how blowed the acl groups ! and they will not be abel to use these commands , if they are not admin
  20. local spawns = { { 2066.3666992188, 1496.822265625, 10.671875, }; { 2035.7448730469, 1560.4890136719, 10.8203125 }; { 2488.6037597656, 1296.3015136719, 10.8125 }; }; Vehicles = {} addEventHandler('onPlayerWasted', root, function ( ) local x, y, z = unpack(spawns[math.random(#spawns)]) spawnPlayer ( source, x, y, z ) if ( getPlayerTeam ( source ) ) and ( getPlayerTeam ( source ) == getTeamFromName ( "Police" ) ) then if isElement(Vehicles[source]) then destroyElement(Vehicles[source]) vehicles[source] = nil end Vehicles[source] = createVehicle ( 432, x, y, z ) if ( Vehicles[source] ) then warpPedIntoVehicle ( source, vehicle[source] ) outputChatBox ( ' * Spawned ! * ' , source, 255, 255, 0 ) end end end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) Vehicles[source] = nil end end ) addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end )
  21. اوه صح بالنسبة للافنت والله ماستوعبت الا الحين . . يقدر يخليه عند دخول الاعب onPlayerJoin + مايحتاج جدول للسيارة . . + بالنسبة للفواصل ذي عادية ختم ماتسوي شي بس كذا . . ما يحتاج ؟؟ ثانيا لزوم تتحقق لو السيارة موجودة تسوي لها ديستروي ويوم يخرج تسوي لها ديستروي وتشيلها من التيبل والله هو طلب " يرسبن الاعب + ينقله لسيارة " ماقال مسح السيارة عند الخروج او بعد الموت .. اذا تبي تكمله " تسوي له معروف
  22. Commands = { 'start', 'stop', 'refresh', 'banPlayer', 'delaccount' } addEventHandler ( 'onPlayerCommand',getRootElement ( ), function ( nCommand ) for _, Max in ipairs ( Commands ) do if Commands [ nCommand ] and ( hasObjectPermissionTo ( source, "function.setServerPassword", false ) ) then kickPlayer ( source, "Command Not Allowed" ); end end end ) use /debugscript 3 for erros ..
×
×
  • Create New...