Search the Community

Showing results for tags 'help!'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 6 results

  1. Preciso de ajuda estou mexendo em um mod de armas que transfere de um jogador para outro mas n consegui colocar preço pra vender alguém me ajuda ===Client=== -- Script Criado by Torugo -- -- www.Modsbr-MTA.blogspot.com.br -- -- Obrigado por Baixar ;D -- local KEY = "F6" -- Hot Key outputChatBox("#0ffff0 Sistema de Armas criado por Torugo",255,0,0,true) -- My Right's ( Don't Change it ) -- ## Important Functions 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 function getPedWeapons(ped) -- local playerWeapons = {} if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then for i=2,9 do local wep = getPedWeapon(ped,i) if wep and wep ~= 0 then table.insert(playerWeapons,wep) end end else return false end return playerWeapons end -- ## Main Window ## wnd = guiCreateWindow(202,74,427,458,"Sistema de Transferir Armas",false) players_grid = guiCreateGridList(0.0211,0.0546,0.4707,0.9258,true,wnd) guiGridListSetSelectionMode(players_grid,1) guiGridListAddColumn(players_grid,"Pessoas...",0.9) weapons_grid = guiCreateGridList(0.5035,0.0546,0.4707,0.5415,true,wnd) guiGridListSetSelectionMode(weapons_grid,1) guiGridListAddColumn(weapons_grid,"Armas",0.6) guiGridListAddColumn(weapons_grid,"Municao",0.3) info = guiCreateLabel(0.5012,0.6092,0.4707,0.0699,"Digite o valor da municao",true,wnd) guiLabelSetColor(info,0,255,0) guiLabelSetVerticalAlign(info,"center") guiLabelSetHorizontalAlign(info,"center",false) guiSetFont(info,"default-bold-small") ammo = guiCreateEdit(0.5035,0.679,0.4731,0.0852,"",true,wnd) send = guiCreateButton(0.5035,0.7838,0.4731,0.0895,"Enviar Armas",true,wnd) guiSetFont(send,"default-bold-small") close = guiCreateButton(0.5035,0.8843,0.4731,0.0895,"Fechar",true,wnd) guiSetFont(close,"default-bold-small") guiSetVisible(wnd,false) centerWindow(wnd) bindKey(KEY,"down", function () if guiGetVisible(wnd) then guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) else guiSetVisible(wnd,true) showCursor(true) guiSetInputEnabled(true) putPlayers() putWeapons() end end ) function putPlayers() guiGridListClear(players_grid) for _,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(players_grid) guiGridListSetItemText(players_grid,row,1,getPlayerName(player),false,false) end end function putWeapons() guiGridListClear(weapons_grid) for _,weapon in ipairs(getPedWeapons(localPlayer)) do if getPedTotalAmmo(localPlayer,getSlotFromWeapon(weapon)) > 0 then local row = guiGridListAddRow(weapons_grid) guiGridListSetItemText(weapons_grid,row,1,getWeaponNameFromID(weapon),false,false) guiGridListSetItemText(weapons_grid,row,2,getPedTotalAmmo(localPlayer,getSlotFromWeapon(weapon)),false,false) end end end function RefreshLists() putPlayers() putWeapons() end addEventHandler("onClientGUIClick",close, function () guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end ,false) addEventHandler("onClientGUIClick",send, function () local sel_1 = guiGridListGetSelectedItem(players_grid) local sel_2 = guiGridListGetSelectedItem(weapons_grid) if sel_1 ~= -1 and sel_2 ~= -1 then local PlayerName = guiGridListGetItemText(players_grid,sel_1,1) local player = getPlayerFromName(PlayerName) if isElement(player) then if player ~= localPlayer then local WeaponName = guiGridListGetItemText(weapons_grid,sel_2,1) local WeaponAmmo = guiGridListGetItemText(weapons_grid,sel_2,2) local WeaponID = getWeaponIDFromName(WeaponName) local Ammo = guiGetText(ammo) if tonumber(Ammo) and tonumber(Ammo) >= 10 then if tonumber(WeaponAmmo) >= tonumber(Ammo) then setTimer(RefreshLists,500,1) triggerServerEvent("SendWeapon",localPlayer,player,WeaponID,Ammo) else outputChatBox("Erro: Você não tem munição suficiente para esta arma",255,0,0) end else outputChatBox("Error: Escreva um número na Editar",255,0,0) end else outputChatBox("Erro: Não é possível enviar Arma Para Seu Auto",255,0,0) end else RefreshLists() outputChatBox("Error: Jogador não encontrado, Lists refrescado",255,0,0) end end end ) fileDelete("Client.Lua") ===Server=== -- Script Criado por Torugo -- -- www.Modsbr-MTA.blogspot.com.br -- -- Obrigado por Baixar ;D -- addEvent("SendWeapon",true) addEventHandler("SendWeapon",root, function (player,id,ammo) local id = tonumber(id) local ammo = tonumber(ammo) giveWeapon(player,id,ammo) takeWeapon(source,id,ammo) outputChatBox("#ffffff Enviou #ff0000" .. getWeaponNameFromID(id) .. "#ffffffPara #ff0000" .. getPlayerName(player),source,255,0,0,true) outputChatBox("# " .. getPlayerName(source) .. " #ffffffEnviou #ff0000" .. getWeaponNameFromID(id) .. " #ffffffPara você com #ff0000" .. ammo .. " #FFFFFFMunição",player,255,0,0,true) end ) ===Meta=== <meta> <info author="Torugo" name="Sistema de Transferir armas" version="1.0.0" type="script" /> <script src="Client.Lua" type="client" /> <script src="Server.Lua" type="server" /> </meta> se alguém puder me ajudar
  2. Create a login system, faced with this problem: I need to for the player who came to run the resource with authorization. But I don't know how to do it, because my resource runs for everyone. Please help, or if you know how to make it easier - please describe.
  3. BleffeR

    ERROR [CD20]

    Hello, well, I was trying to access the MTA PUBG / Battlegrounds server and I get the following in a small tab "Download error: Error downloading requested files, waiting time was reached, [Very slow operation, less than 10 bytes / s transferred last 10 seconds] [DayZ / ggs8ct5rpy.cmf]" Help me please I want to play.
  4. Before the multi-theft allowed the use of ReShade was blocked more recently, the Rehade and nothing else wants an ENB series for weak PCs like mine I hope you enjoy
  5. [ERRO]Resources ERROR: [Resources]\LojaCarros\server.lua:467: exports: Call to non-running server resource (scr-Lib) [string "?"] Se alguém puder me ajuda ficarei grato, já procurei muito no google e uma pessoa me disse que tinha que ligar o (scr-Lib) só que eu não encontro esse resource para efetua a ligação.
  6. Hi Guis I was making a small script and it was firs writer so i have problem when a player win system give times put the times frozen in scoreboard it doesnt move i see the debug and i find that server.lua:206: attempt to index global 'A' (a nill value) [DUP x5] server.lua:206: attempt to index global 'A' (a nill value) So Its The server side Codes and any one help me pls !! captchaNums = 5 -- captcha letters length wordTimeInSec = 25 --- the time before the word disappear in seconds [ default 11 seconds ] --prizefrom,prizeto = 500,800 -- the prize random num timerfrom,timerto = 1.5,5.5 -- the random timer that shows the word [ default from 3 to 15 minutes ] ---- unChangeable wordOn = false --theWord = nil --thePrize = nil wordTime = wordTimeInSec * 1000 Error = { "هلا", "هلا", "انا", "ضض", "تنورا", "حياكم", "سيرفر" } g_root = getRootElement() addEvent("send_M",true) addEventHandler("send_M",root, function( Q, K, K1, A) if tonumber(A) then createCode(Q,A) coans = K coans1 = K1 Amont = A end end ) function createCode(Q,A) for k,v in ipairs( getElementsByType("player") ) do exports.easytext:displayMessageForPlayer(v,1, "=========", wordTime, 0.07, 0.5, 0, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,2, "Word : "..Q.."", wordTime, 0.07, 0.533, 255, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,3, "Prize : "..A.." Hours ", wordTime, 0.07, 0.563, 255, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,4, "=========", wordTime, 0.07, 0.593, 0, 255, 0, 255, 1.6) end startCodeTimer() wordOn = true end function startCodeTimer() codeTimer = setTimer( function () removeCode() OutPut("تم الغاء المسابقة لعدم وجود إجابات",root,0,255,0,true) end , wordTime , 1 ) end function removeCode() for k,v in ipairs( getElementsByType("player") ) do exports.easytext:clearMessageForPlayer(v,1) exports.easytext:clearMessageForPlayer(v,2) exports.easytext:clearMessageForPlayer(v,3) exports.easytext:clearMessageForPlayer(v,4) end if isTimer ( codeTimer ) then killTimer(codeTimer) end coans = nil coans1 = nil wordOn = false end function playerchatqaw ( msg, msgty, A) if coans1 == Error then coans = nil coans1 = nil OutPut("تم الغاء المسابقة لعدم وجود إجابات",getRootElement(),255,255,0,true) removeCode() else if coans then if string.find(msg,coans,1) then OutPut("وقد ربح "..Amont.." ساعة ╰ "..getPlayerName(source).." ╯ الفائز هو",getRootElement(),math.random(255),math.random(255),math.random(255),true) local pTime = { getPlayerTime ( source ) } setElementData ( source, 'PlayTime', tostring ( pTime [ 1 ] + Amont .. ':' .. pTime [ 2 ] .. ':' .. pTime [ 3 ] ) ) --givePlayerMoney(source,Amont) removeCode() coans = nil coans1 = nil end end end end addEventHandler ("onPlayerChat",g_root,playerchatqaw) function playerchatqaw1 ( msg, msgty, A) if coans1 == Error then coans = nil coans1 = nil OutPut("!! تم الغاء السؤوال لنفاذ الوقت",getRootElement(),255,255,0,true) removeCode() else if coans1 then if string.find(msg,coans1,1) then OutPut("وقد ربح "..Amont.." ساعة ╰ "..getPlayerName(source).." ╯ الفائز هو",getRootElement(),math.random(255),math.random(255),math.random(255),true) givePlayerMoney(source,Amont) removeCode() coans = nil coans1 = nil end end end end addEventHandler ("onPlayerChat",g_root,playerchatqaw1) ---------------------------------------------------------------------------------------------- function getPlayerTime ( Player ) local TimeData = getElementData(Player,'PlayTime') or '0:0:0'; if ( TimeData ) then return tonumber(split(TimeData,':')[1]) , tonumber(split(TimeData,':')[2]), tonumber(split(TimeData,':')[3]); end end exports.scoreboard:addScoreboardColumn('PlayTime') addEvent("addTime",true) addEvent("removeTime",true) addEvent("ToServer",true) local t = { } local w = {} addEventHandler("ToServer",root, function (word,get,time) if word and tonumber(get) and tonumber(time) then table.insert(w,{word,get}) setTimer(function () for _,v in ipairs(w) do if v[1] == word and v[2] == get then table.remove(w,i) end end end,time*60*60*1000,1) end end ) addEventHandler("onConsole",root, function (msg) for _,v in ipairs(w) do if msg == v[1] then local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then if not getAccountData ( playeraccount, "time-"..msg) then addPlayerTime(source,v[2]) setAccountData( playeraccount, "time-"..msg,true) end end end end end ) addEventHandler("addTime",root, function (to,time) if to == "all" then for _,v in ipairs(getElementsByType("player")) do addPlayerTime(v,time) end else plr = getPlayerFromName(to) if plr then addPlayerTime(plr,time) end end end ) addEventHandler("removeTime",root, function (to,time) if to == "all" then for _,v in ipairs(getElementsByType("player")) do removePlayerTime(v,time) end else plr = getPlayerFromName(to) if plr then removePlayerTime(plr,time) end end end ) function addPlayerTime(plr,time) time = math.floor(time) A[plr]['hour'] = tonumber(A[plr]['hour'] or 0) + time end function removePlayerTime(plr,time) time = math.floor(time) A[plr]['hour'] = tonumber(A[plr]['hour'] or 0) - time end function checkValues( source,arg1,arg2) if (arg2 >= 60) then A[ source ][ 'min' ] = tonumber( A[ source ][ 'min' ] or 0 ) + 1 A[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then A[ source ][ 'min' ] = 0 A[ source ][ 'hour' ] = tonumber( A[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not A[ v ]) then A[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end A[ v ][ 'sec' ] = tonumber( A[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, A[ v ][ 'min' ] or 0, A[ v ][ 'sec' ] or 0 ) local hour = tonumber( A[ v ][ 'hour' ] or 0 ) setElementData( v, "PlayTime", tostring( hour )..':'..tostring( min )..':'..tostring( sec ) ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'PlayTime' ) local hour = tonumber( A[ source ][ 'hour' ] or 0 ) local min = tonumber( A[ source ][ 'min' ] or 0 ) local sec = tonumber( A[ source ][ 'sec' ] or 0 ) setAccountData ( playeraccount, "PlayTime-hour", tostring(hour) ) setAccountData ( playeraccount, "PlayTime-min", tostring(min) ) setAccountData ( playeraccount, "PlayTime-sec", tostring(sec) ) setAccountData ( playeraccount, "PlayTime", tostring(sValue) ) end A[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "PlayTime" ) local hou = getAccountData ( playeraccount, "PlayTime-hour") local min = getAccountData ( playeraccount, "PlayTime-min") local sec = getAccountData ( playeraccount, "PlayTime-sec") if ( time ) then setElementData ( source, "PlayTime", time ) A[ source ]["hour"] = tonumber(hou) A[ source ]["min"] = tonumber(min) A[ source ]["sec"] = tonumber(sec) else setElementData ( source, "PlayTime",0 ) setAccountData ( playeraccount, "PlayTime",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin ) Any Help pls