Jump to content

fargot..

Members
  • Posts

    142
  • Joined

  • Last visited

Everything posted by fargot..

  1. ضايفه وما ينفع
  2. السلام عليكم ورحمة الله وبركاته اريد حل لدي المشكلة او دا الكود admin/server/admin_server.Lua @ line 363: Access denied @ 'setPlayerMuted' الكود : addEvent ( "onPlayerMute", false ) -- line 361 function aSetPlayerMuted ( player, state, length ) -- line 362 if ( setPlayerMuted ( player, state ) ) then -- line 363 if not state then -- line 364 aRemoveUnmuteTimer( player ) -- line 365 elseif state and length and length > 0 then -- line 366 aAddUnmuteTimer( player, length ) -- line 367 end -- line 368 triggerEvent ( "onPlayerMute", player, state ) -- line 369 return true -- line 370 end return false end
  3. يعني كذا انت حليتها ؟
  4. اعطيني حل مشكلة حق دي Banks-System/server.Lua:118: attempt to perform arithmetic on a boolean value -line=112- addEvent("AddMoneyToBank",true) -line=113 addEventHandler("AddMoneyToBank",root, -line=114 function (player,money) -line=115 local sourceAccount = getPlayerAccount ( player ) -line=116 local AccountName = getAccountName(sourceAccount) -line=117 --local new = getAccountSavedMoney ( AccountName )+money -line=118 local new = getElementData(player,"Bank")+money -line=119 --takePlayerMoney(player,money) -line=120 setElementData(player,"Money",(getElementData(player,"Money") or 0 ) - money) -line=121 setElementData(player,"Bank",(getElementData(player,"Bank") or 0 ) + money) -line=123 --setAccountSavedMoney ( AccountName, new ) -line=124 --setElementData(player,"Bank", new) -line=115 triggerClientEvent ( "onOpenBankWindow", player, player, new ) end )
  5. السلام عليكم و رحمة الله وبركاته اعطني حل لدي مشكلة == mod//:client:attempt to compare number with boolean
  6. يعني كذا انت حليت المشكلة ؟
  7. السلام عليكم ورحمة الله وبركاته اعطوني معنى ددا المشكلة Point-System\c.Lua @ line 81: bad argument #1 to 'gsub' (string expected, got nil) الكود 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
  8. الكود CrtTable = {}; TableCars = {}; updateText() if isTimer(DerbyCheckTimer) then killTimer(DerbyCheckTimer); end exports.M7ShooterMission:STARTShooterMission() setMarkerColor(CrM,0,255,0,255) elseif #CrtTable == 0 then killTimer ( DerbyCheckTimer ) for i, cars in ipairs(TableCars) do destroyElement ( cars ) end TableCars = {} exports["guimessages"]:outputServer(root, "#3399FF[Derby Mission] #FF0000The Derby Mission Was End !", 0, 255, 255) exports.M7ShooterMission:STARTShooterMission() setMarkerColor(CrM,0,255,0,255) end end end ---System---
  9. السلام عليكم و رحمة الله وبركاته اعطوني معنى ددا الكود WARNING: M6DerbyMission/s.Lua:337: Bad argument @ 'killTimer' [Expected Lua-timer at argument 1, got nil]
  10. مشكور ركان مشكورين على المساعدة ركان في مشكلة بعد ما اوزع يقلي روح للانفيتوري تلقاه يعني اف 7 بعد ما اروح ما القى البكج في اف 7 عشان افتحه
  11. تمام حليتها اعطيني الحين تاع دي Server [12:27:22] Packages\server.lua @ line 176: Bad argument @ 'triggerEvent' [Expected string at argument 1, got player]
  12. سطر 57 بتاع الكلينت ولا سيرفير ؟
  13. بروس الحين اقدر اوزع بس عند ما اوزع يطلع دي Server [00:48:35] [Gta-Mc]Packages\server.lua @ line 35: Bad argument @ 'getPlayerAccount' [Expected player or console at argument 1, got root] و دي كمان Client [00:52:52] [Gta-Mc]Packages\client.lua @ line 101: Bad argument @ 'guiStaticImageLoadImage' [Expected gui-element at argument 1, got nil] ملف الكلينت هو فوق شوف الاكود فوق
  14. بجربه ونشوف تظهر لي كذا [20:29:52] [Gta-Mc]Packages\server.lua @ line 39: Bad argument @ 'addCommandHandler' [Expected staring at argument 1, got nill] Client [20:29:52] [Gta-Mc]Packages\client.lua @ line 101: Bad argument @ 'guiStaticImageLoadImage' [Expected gui-element at argument 1, got nil] Client : local screenW, screenH = guiGetScreenSize() local alpha = 255 local img = "img/pack.png" local wnd = {} function render () dxDrawImage(screenW - 252 - 10, (screenH - 225) / 2, 252, 225, img, 0, 0, 0, tocolor(255, 255, 255, alpha), false) end addEvent ( 'Package:Random', true ) addEventHandler ( 'Package:Random', root, function () if sound then return end img = "img/pack.png" addEventHandler("onClientRender", root, render) sound = playSound ( 'sound.mp3' ) setTimer ( function () local rnd = math.random ( 100 ) if rnd == 32 and rnd == 16 and rnd == 11 and rnd == 48 then if isElement ( sound ) then destroyElement ( sound ) end pack = 1 img = "img/lucky"..pack..".png" sound = playSound ( 'sound2.mp3' ) setTimer ( function () if isElement ( sound ) then destroyElement ( sound ) end end, 2000, 1 ) elseif rnd >= 1 and rnd <= 50 and rnd ~= 48 and rnd ~= 32 and rnd ~= 11 and rnd ~= 16 then if isElement ( sound ) then destroyElement ( sound ) end pack = 2 img = "img/lucky"..pack..".png" sound = playSound ( 'sound2.mp3' ) setTimer ( function () if isElement ( sound ) then destroyElement ( sound ) end end, 2000, 1 ) else if isElement ( sound ) then destroyElement ( sound ) end pack = 3 img = "img/lucky"..pack..".png" sound = playSound ( 'sound2.mp3' ) setTimer ( function () if isElement ( sound ) then destroyElement ( sound ) end end, 2000, 1 ) end setTimer(function() removeEventHandler("onClientRender", root, render) sound = nil end, 3000, 1) triggerServerEvent ( 'Package:givePlayerPackage', localPlayer, pack, 1 ) end ,6000, 1 ) end) addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() wnd.main = guiCreateWindow((screenW - 380) / 2, (screenH - 298) / 2, 380, 298, "[ Gta-Mc ] : My Packages", false) guiWindowSetMovable(wnd.main, false) guiWindowSetSizable(wnd.main, false) guiSetVisible ( wnd.main, false ) wnd.grid = guiCreateGridList(10, 28, 189, 257, false, wnd.main) guiGridListAddColumn(wnd.grid, "Package", 0.5) guiGridListAddColumn(wnd.grid, "Ammount", 0.3) -- wnd.pack = guiCreateStaticImage(221, 49, 137, 168, "img/pack.png", false, wnd.main) wnd.open = guiCreateButton(212, 251, 71, 34, "Open the pack", false, wnd.main) guiSetAlpha(wnd.open, 0.78) guiSetFont(wnd.open, "default-bold-small") wnd.close = guiCreateButton(293, 251, 71, 34, "Close", false, wnd.main) guiSetAlpha(wnd.close, 0.78) guiSetFont(wnd.close, "default-bold-small") end) bindKey("F7","down", function () guiSetVisible ( wnd.main, true ) showCursor ( true ) guiBringToFront ( wnd.main ) triggerServerEvent ( 'Package:getMyPackages', localPlayer ) end) addEventHandler ( 'onClientGUIClick', resourceRoot, function (button, state) if button == "left" and state == "up" then if _bug then return 'Stuuuuuupid :Pp' end if source == wnd.close then guiSetVisible ( wnd.main, false ) showCursor ( false ) elseif source == wnd.open then if ( guiGridListGetSelectedItem ( wnd.grid ) ~= -1 ) then local ammount = tonumber ( guiGridListGetItemText ( wnd.grid, guiGridListGetSelectedItem ( wnd.grid ), 2 ) ) if ammount > 1 then triggerServerEvent ( 'Package:openPack', localPlayer, guiGridListGetItemData ( wnd.grid, guiGridListGetSelectedItem ( wnd.grid ), 1 ) ) guiGridListSetItemText ( wnd.grid, guiGridListGetSelectedItem ( wnd.grid ), 2, tostring ( ammount - 1 ), false, false ) else triggerServerEvent ( 'Package:openPack', localPlayer, guiGridListGetItemData ( wnd.grid, guiGridListGetSelectedItem ( wnd.grid ), 1 ) ) guiGridListRemoveRow ( wnd.grid, guiGridListGetSelectedItem ( wnd.grid ) ) end guiSetEnabled ( wnd.open, false ) setTimer ( guiSetEnabled, 5000, 1, wnd.open, true ) end elseif source == wnd.grid then local id = guiGridListGetItemData ( wnd.grid, guiGridListGetSelectedItem ( wnd.grid ), 1 ) if id and (fileExists("img/lucky"..id..".png")) then guiStaticImageLoadImage(wnd.pack, "img/lucky"..id..".png") else guiStaticImageLoadImage(wnd.pack, "img/pack.png") end end end end) addEvent ( 'Package:addPackagesToGridList', true ) addEventHandler ( 'Package:addPackagesToGridList', root, function ( packages ) if packages then guiGridListClear ( wnd.grid ) for i,v in ipairs ( packages ) do local row = guiGridListAddRow ( wnd.grid ) local type if v['number'] == 1 then type = 'Gold' elseif v['number'] == 2 then type = 'Silver' elseif v['number'] == 3 then type = 'Bronze' end guiGridListSetItemText ( wnd.grid, row, 1, tostring ( type ), false, false ) guiGridListSetItemText ( wnd.grid, row, 2, tostring ( v['ammount'] ), false, false ) guiGridListSetItemData ( wnd.grid, row, 1, tostring ( v['number'] ) ) end end end) _bug = false function handleInterrupt( status ) if ( status == 0 ) then _bug = true elseif ( status == 1 ) then _bug = false end end addEventHandler( "onClientPlayerNetworkStatus", root, handleInterrupt)
  15. يعني كذا انت صلحتها ؟
  16. function givePlayerRandomPackage ( player ) if not getPlayerAccount ( player ) then return end triggerClientEvent ( player, 'Package:Random', player ) end addCommandHandler ( 'getP', function ( ) givePlayerRandomPackage ( root ) givePlayerRandomPackage ( source ) outPut ( ' Your Get Package To all', root ) triggerClientEvent ( source, 'Package:Random', source ) end) addEvent ( 'Package:givePlayerPackage', true ) function givePlayerPackage ( package, ammount ) if package then local _type if package == 1 then _type = 'Gold' elseif package == 2 then _type = 'Silver' elseif package == 3 then _type = 'Bronze' end local account = getAccountName ( getPlayerAccount ( source ) ) local result = dbPoll(dbQuery(db, "SELECT * FROM Packages WHERE account = ? AND number = ? ", account, package), -1) if type(result) == "table" and #result ~= 0 and result[1]["account"] == account and result[1]["number"] == package then dbExec(db, "UPDATE Packages SET ammount = ? WHERE account = ? AND number = ?", tonumber ( result[1]["ammount"] + ammount ), account, package) outPut ( ammount.." of 'Lucky ".._type.."' package has been added to your inventory.", source ) else dbExec ( db, "INSERT INTO Packages VALUES (?,?,?)", account, package, ammount) outPut ( ammount.." of Lucky ".._type.." package has been added to your inventory.", source ) end end end addEventHandler ( 'Package:givePlayerPackage', root, givePlayerPackage ) addEvent ( 'Package:openPack', true ) addEventHandler ( 'Package:openPack', root, function ( package ) if package then package = tonumber ( package ) local account = getAccountName ( getPlayerAccount ( source ) ) local result = dbPoll(dbQuery(db, "SELECT * FROM Packages WHERE account = ? AND number = ?", account, package), -1) if type(result) == "table" and #result ~= 0 and tonumber ( result[1]["ammount"] ) > 0 then if package == 1 then packType[source] = math.random ( #Lucky1 ) giveReward ( source, Lucky1, packType[source] ) elseif package == 2 then packType[source] = math.random ( #Lucky2 ) giveReward ( source, Lucky2, packType[source] ) elseif package == 3 then packType[source] = math.random ( #Lucky3 ) giveReward ( source, Lucky3, packType[source] ) end dbExec(db, "UPDATE Packages SET ammount = ? WHERE account = ? AND number = ?", tonumber ( result[1]["ammount"] - 1 ), account, package) end end end) function giveReward ( player, pType, random ) if pType[random][2] == 'Car' then local model = CarIDs[math.random ( #CarIDs )] triggerEvent("GivePlayerVehicle", player, getPlayerName ( player ), getAccountName ( getPlayerAccount ( player ) ), model, 0, player) outPut ( ' You won '..getVehicleNameFromModel ( model )..' from your lucky packages.', player ) elseif pType[random][2] == 'kMoney' then local myG = getElementData(player,"Gold") or 0 setElementData(player,"Gold",tonumber(myG+pType[random][3])) outPut ( ' You won '..pType[random][3]..' K money from your lucky packages.', player ) elseif pType[random][2] == 'Weapon' then local rnd = math.random ( 3 ) if rnd == 1 then giveWeapon ( player, 36, 20, true ) elseif rnd == 2 then giveWeapon ( player, 35, 20, true ) elseif rnd == 3 then giveWeapon ( player, 38, 9999, true ) end setPedStat ( player, 24, 1000 ) setElementHealth ( player, 200 ) outPut ( ' You won '..getPedTotalAmmo ( player )..' Ammo of '..getWeaponNameFromID ( getPedWeapon ( player ) )..' and 200HP from your lucky packages.', player ) elseif pType[random][2] == 'Launcher' then setElementData(player,"CancelData",true) local myG = getElementData(player,"GLA") or 0 if tonumber(myG) < tonumber ( pType[random][3] ) then setElementData(player,"GLA",tonumber(pType[random][3])) end setElementData(player,"CancelData",nil) outPut ( ' You won '..pType[random][3]..' Launchers from your lucky packages.', player ) elseif pType[random][2] == 'Health' then setPedStat ( player, 24, 1000 ) setElementHealth ( player, 200 ) outPut ( ' You won 200HP from your lucky packages.', player ) elseif pType[random][2] == 'Money' then local pMoney = getPlrMoney ( player ) setElementData(player,"Money", tonumber(pMoney+pType[random][3])) outPut ( ' You won '..pType[random][3]..'$ from your lucky packages.', player ) elseif pType[random][2] == 'Exp' then local myG = getElementData(player,"XP") or 0 setElementData(player,"XP",tonumber(myG+pType[random][3])) local myP = getElementData(player,"PXP") or 0 setElementData(player,"PXP",tonumber(myP+pType[random][3])) outPut ( ' You won '..pType[random][3]..' Exp from your lucky packages.', player ) elseif pType[random][2] == 'Gold' then -- idkkk #Nu9aiF outPut ( ' You are lucky , you get VIP weapons.', player ) elseif pType[random][2] == 'VIP' then -- idkkk #Nu9aiF outPut ( ' OMG !!! , you won a VIP for 1 day.', player ) elseif pType[random][2] == 'CarSkin' then local rnd = math.random ( #Skins ) givePlayerCarSkin ( player, rnd ) outPut ( ' You got a car skin, '..Skins[rnd][1], player ) end random = nil end ------------ -- USEFUL -- ------------ addEventHandler ( "onPlayerWasted", getRootElement(), function ( _, attacker ) if attacker and isElement ( attacker) and getElementType ( attacker ) == 'player' and attacker ~= source then local randomm = math.random ( 1 ) local _random = math.random ( 80 ) if randomm == _random then givePlayerRandomPackage ( attacker ) end end end) addEvent ( 'Package:getMyPackages', true ) addEventHandler ( 'Package:getMyPackages', root, function ( ) local account = getAccountName ( getPlayerAccount ( source ) ) local result = dbPoll(dbQuery(db, "SELECT * FROM Packages WHERE account = ?", account), -1) if type(result) == "table" and #result ~= 0 and result[1]["account"] == account and tonumber ( result[1]["ammount"] ) > 0 then triggerEvent ( source, 'Package:addPackagesToGridList', source, result ) end end) function getPlrMoney (plr) if plr then local data = getElementData(plr,"Money") if data then return tonumber(data) end end return tonumber(0) end function givePlayerCarSkin ( player, skin ) if Skins[skin] then local account = getAccountName ( getPlayerAccount ( player ) ) local result = dbPoll(dbQuery(db, "SELECT * FROM CarSkins WHERE account = ? AND skin = ? ", account, skin), -1) if type(result) == "table" and #result == 0 then dbExec ( db, "INSERT INTO CarSkins VALUES (?,?,?)", account, skin, Skins[skin][1]) end end end addEvent ( 'VehicleSkin:getMySkins', true ) addEventHandler ( 'VehicleSkin:getMySkins', root, function () local account = getAccountName ( getPlayerAccount ( source ) ) local result = dbPoll(dbQuery(db, "SELECT * FROM CarSkins WHERE account = ?", account), -1) if result then triggerClientEvent ( source, 'onGetMySkins', source, result ) end end) ----------------------------------- function setVehicleSkin ( vehicle, skin ) local owner = getElementData(vehicle, "Owner") local id = getElementData ( vehicle, 'ID') if owner and owner == source and id then for i,v in ipairs ( VehiclesSkins ) do if v[1] == id then table.remove ( VehiclesSkins, i ) end end table.insert ( VehiclesSkins, { id, skin } ) triggerClientEvent ( 'VehicleSkin:setVehicleSkin', source, vehicle, skin ) end end addEvent ( 'setVehicleSkin', true ) addEventHandler ( 'setVehicleSkin', root, setVehicleSkin) addEvent ( 'getAllCarsSkins', true ) addEventHandler ( 'getAllCarsSkins', root, function () if VehiclesSkins then outputChatBox ( 'trigger') triggerClientEvent ( source, 'VehicleSkin:getSkinsTable', source, VehiclesSkins ) end end) addEvent ( 'resetVehicleSkin', true ) addEventHandler ( 'resetVehicleSkin', root, function ( vehicle ) if vehicle then local owner = getElementData(vehicle, "Owner") local id = getElementData ( vehicle, 'ID') if owner and owner == source and id then for i,v in ipairs ( VehiclesSkins ) do if v[1] == id then table.remove ( VehiclesSkins, i ) triggerClientEvent ( 'removeSkin', source, vehicle ) return end end end end end) addEventHandler("onElementDataChange",getRootElement(), function (dataName,oldValue) if getElementType ( source ) == 'vehicle' then local owner = getElementData ( source, 'Owner') local id = getElementData ( source, 'ID') if (dataName == "Owner" and owner and isElement ( owner ) ) then for i,v in ipairs ( VehiclesSkins ) do if v[1] == id then triggerClientEvent ( 'VehicleSkin:setVehicleSkin', source, source, v[2] ) return end end end end end) حطيت الكود
  17. السلام عليكم و رحمة الله وبركاته اعطوني شرح دي المشكلة Server [16:06:22] MOD1\server.lua @ line 35: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got nil] [16:06:22] MOD1\server.lua @ line 44: Bad argument @ 'triggerClientEvent' [Expected string at argument 1, got nil] ....
  18. دا للكود dxCreateFont or guiSetFont وين احطه ؟
  19. السلام عليكم ورحمة الله وبركاته كيف اخلي شكل الكتابة كذا يعني مزخرف كذا ؟
  20. مشكورين لقيت مشكلة خلاص
  21. السلام عليكم ورحمة الله وبركاته فتحت سيرفير جديد بس ما قدرت اسجل في اف 8 ماقدر اسوي فيه ولا شئ كيف اسجل وش المشكلة ؟
  22. fargot..

    Help

    Hello I have a server and opened it for me a short time but I have a problem in the registration recorded by the command but what I estimated I recorded how to register ?? ...
  23. fargot..

    Help

    اضيف سكربت يعني كذا resource.Point-System ?? المشكلة ثاني ما فهمتها
  24. fargot..

    Help

    السلام عليكم اعطوني حل لدي المشكلة :
×
×
  • Create New...