Jump to content

MaRcell

Members
  • Posts

    160
  • Joined

  • Last visited

Everything posted by MaRcell

  1. so on my system when i'm going to set something on the player and take it with setTimer dps for 9 seconds, won't you? will it be because that is not all that has to do to put setTimer inside the function? elseif (type == "Crack") then local inventory = getElementData(client,"inventory") if inventory[type] then inventory[type].amount = inventory[type].amount - 1 outputChatBox("#FF6464[DROGAS]#00FF00Voce Esta Fumando "..type.." agora voce tem "..inventory[type].amount,client, 0, 255, 0, true) triggerClientEvent(client,"onPlayerUserItem",client,type,inventory) setElementData(client,"inventory",inventory,true) setTimer(setPedGravity,9000,1,client,0.0008) setTimer(setPedWalkingStyle,9000,1,client, 137 ) setPedAnimation( client, "BAR", "dnk_stndM_loop") setTimer(setPedAnimation,9000,1,client, nil, nil) local x, y, z = getElementPosition ( client ) sigarette = createObject ( 1485, 0, 0, 5 ) setTimer(destroyElement,9000,1,sigarette) attachElements ( sigarette, client, 0.05, 0, 0.7, 0, 45, 118 ) setElementData(client,"inventory",inventory,true)
  2. how would it be right to use, for the chat to appear just for me? never used outpuchatbox on the client side
  3. loadstring(exports.dgs:dgsImportFunction())() local sw, sh = guiGetScreenSize() local sx, sy = (sw/1920), (sh/1080) progressbar = dgsCreateProgressBar(80,730, 226, 34,false,nil,nil,tocolor(28 ,28 ,28, 120),nil,tocolor(255,255, 255, 120) , nil) text = dgsCreateLabel (0.02,0.04,0.94,0.2,"LEVEL: " ..(getElementData(localPlayer,"Level") or 0),true,progressbar,tocolor(0 ,0 ,0,255), nil, nil,nil,nil,nil,"center") font = dgsSetFont(text , "bankgothic") xp = 0 setTimer(function () local team = getPlayerTeam(localPlayer) if team then dgsSetVisible(progressbar,true) else dgsSetVisible(progressbar, false) end end,1000,0) setTimer(function () local xp = getElementData( localPlayer, "xp") local level = getElementData(localPlayer, "level") if xp and level then if xp >=100 then setElementData(localPlayer,"level",level +1) outputChatBox("#FFFFFF[GANG] #00FFFF Você Passou pro level "..(getElementData(localPlayer,"level").. " na sua gang.",localPlayer,255, 255, 255, true ) setElementData(localPlayer,"xp", 0) dgsProgressBarSetProgress(progressbar,0) else setElementData(localPlayer,"xp",xp + 10) dgsProgressBarSetProgress(progressbar,xp+10) end dgsSetText(text,"LEVEL: "..level) end end,60000,0) is giving error in the outputChatBox, in the localPlayer, ta returning q and a value nil do not understand it seems all right ..
  4. local screenx, screeny = guiGetScreenSize() local sx, sy = (screenx/1920), (screeny/1080) loadstring(exports.dgs:dgsImportFunction())() local blip = nil local blip2 = nil local width = 700 local height = 700 GangMarcar = dgsCreateWindow((screenx - sx*720)/2, (screeny - sy*810)/2, sx*720, sy*810, "MARQUE UM DESTINO PARA SUA GANG", false, tocolor(0, 0, 0, 255), sy*50, nil, tocolor(0, 255, 255, 150), nil, tocolor(0, 0, 0, 150), sy*5, true) dgsWindowSetMovable(GangMarcar, false) dgsWindowSetSizable(GangMarcar, false) dgsSetVisible(GangMarcar, false) GangMarcarMap = dgsCreateImage(sx*10, sy*10, width, width, "Images/radar.jpg", false, GangMarcar, tocolor(255,255,255,255)) GangMarcarLabel0 = dgsCreateLabel(sx*10, sy*720, sx*480, sy*20, "BOTÃO DIREITO DO MOUSE PRA TIRAR", false, GangMarcar, tocolor(255, 255, 0, 255), sy*1.5, sy*1.5, sy*1.5, sy*1.5, tocolor(0, 0, 0, 255), "right", "center") GangMarcarSair = dgsCreateButton(sx*610, sy*720, sx*100, sy*30, "SAIR", false, GangMarcar, tocolor(0, 0, 0, 255), sy*1.5, sy*1.5, nil, nil, nil, tocolor(255, 77, 77, 150), tocolor(255, 0, 0, 150), tocolor(255, 61, 153, 150)) addEventHandler("onDgsMouseClick", getRootElement(), function(button, state, absoluteX, absoluteY) if (button == "left" and state == "down") then if (source == GangMarcarMap) then elseif (source == GangMarcarSair) then dgsSetVisible(GangMarcar, false) dgsSetEnabled(Gang, true) painelsVisivel = nil end end end) Hello guys, my problem is to calculate the click on the gui map with the position of gta
  5. MaRcell

    [HELP]BOTS

    I was wondering if there is any way to improve this system of ped / bot, when the bot sees the player he already shoots, and how do I create more bots on the msm team for them to try to kill my player? and like I want them to attack me without me attacking them ped = createPed(106, 2439.27856, -2096.04248 ,13.54688) addEventHandler("onClientPedDamage", getRootElement(), function(attacker) if source == ped then givePedWeapon(ped, 27, 500, true) setPedControlState(source, "fire", true) if attacker then setPedAimTarget(source,getElementPosition(attacker)) end end end )
  6. MaRcell

    [HELP] SPAWN

    would i have to use a spawn player for each value in the table?
  7. MaRcell

    [HELP] SPAWN

    it is because afterwards I will put other values in the table so from the table otherwise I would only do a spawnPlayer (source, x, y, z)
  8. MaRcell

    [HELP] SPAWN

    how do I pull the value from the table, for the spawn? I have doubts I thought it was so but it was not lol local spawnLocation = { {2028.17480 ,-1405.71252 ,17.22696} } function spawn() spawnPlayer(source,spawnLocation) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler( "onPlayerWasted", getRootElement(), spawn )
  9. MaRcell

    [HELP] BAN

    well, I did this system of banning player by command, but it is not going, I write / iban ID, days and nothing happens .. will there be a problem with the account I made addCommandHandler("iban", function(playerSource, commandName, id, days, ...) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("Admin")) then if(id) then local playerID = tonumber(id) seconds = tonumber(seconds) or 60 if(playerID) then local targetPlayer = getPlayerID(playerID) if targetPlayer then local seconds = days*86400 local reason = table.concat({...}, " ") if ( hasObjectPermissionTo (playerSource, "function.banPlayer" ) ) then outputChatBox("#00FFFFO jogador "..getPlayerName(targetPlayer).." foi banido por ".. tostring(seconds).." dias por "..getPlayerName(playerSource)..". Motivo: "..reason..".",root,0,0,0,true) banPlayer(targetPlayer , false, false, true, getRootElement(), reason, seconds) end end end end end end)
  10. MaRcell

    [HELP] IKICK

    it is a function only of those who are in that acl may be kicking the player but it doesn’t happen due to an error systemAdm/a.Lua:99: cannot use '...' outside a vararg function near '...' addCommandHandler("ikick", function(playerSource,commandName,id) if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("Admin")) then if(id) then local playerID = tonumber(id) if(playerID) then local targetPlayer = getPlayerID(playerID) if targetPlayer then local reason = table.concat({...}," ") kickPlayer ( playerID, PlayerSource, reason ) end end end end end
  11. MaRcell

    [HELP]SCRIPT

    I wanted to know the functions that I could create a script to / sell, / buy drugs, the player could start working on selling drugs for a marker and would have a panel of what drugs he would have and the player who bought the drug would also have one panel of what drugs do I buy
  12. it hasn't worked yet the panel opens as soon as I turn on the resource and doesn't open when I pass the marker
  13. ah got it i didn't know about this value question thank you very much !!
  14. But without the marker, if I put the panel to appear without a marker, it appears normally so I thought it wasn’t the problem of the coordinates but I will test it thanks!
  15. msm eu colocando true ali no lugar do false no visible , nao aparece meu painel /=
  16. yes, or false it was only for a test since with true the panel would not open only the cursor the problem is that my panel doesn't open, just open the msm cursor having true there instead of false
  17. I am creating a script with dgs a gang panel, so that the marker does not open my panel will I have done something wrong? for me it's all right. obs: I don't know how to move with dgs local screenx, screeny = guiGetScreenSize() local sx, sy = (screenx/1920), (screeny/1080) loadstring(exports.dgs:dgsImportFunction())() ------groveWindow STREET------------- local markergrove = createMarker ( 2498.9873046875, -1685.6142578125, 13.446597099304 -1,"cylinder", 1.5, 0 ,255 ,0 ,170) groveWindow= dgsCreateWindow (sx*20, sy*300, sx*300, sy*400, "GROVE STREET", true, tocolor(0 ,0 ,0), sy*30, false, tocolor(0 ,238, 0 ,255), nil, tocolor(28 ,28, 28,120), 5,true) label= dgsCreateLabel(2, 10,100, 90,"BEM VINDO A groveWindow STREET",false,groveWindow) label1= dgsCreateLabel(2, 50,10, 10,"é uma das principais gang de LS",false,groveWindow) label2= dgsCreateLabel(2, 70,20, 20,"A GS é uma gangue de rua",false,groveWindow) label3= dgsCreateLabel(2, 90,20, 20,"afro-americana e uma das mais",false,groveWindow) label4= dgsCreateLabel(2, 110,20, 20,"antigas gangues de rua em LS",false,groveWindow) label5= dgsCreateLabel(2, 160,20, 20,"RIVAIS : BALLAS, VAGOS",false,groveWindow) buttonEntrar = dgsCreateButton(2, 210,100,40,"ENTRAR!", false, groveWindow ) buttonSair= dgsCreateButton(100, 210,100,40,"SAIR!", false, groveWindow ) dgsSetFont ( label, "sans" ) dgsSetFont ( label1, "sans" ) dgsSetFont ( label2, "sans" ) dgsSetFont ( label3, "sans" ) dgsSetFont ( label4, "sans" ) dgsSetFont ( label5, "default-bold" ) addEventHandler ("onClientMarkerHit",root, function () if (source == markergrove) then dgsSetVisible(groveWindow,false) showCursor(true) end end)
  18. Eu estou criando um script com dgs um painel de gang , so que a marker nao abre meu painel sera que eu fiz algo errado ? pra min ta tudo certo . obs : nao sei mecher mto com dgs local screenx, screeny = guiGetScreenSize() local sx, sy = (screenx/1920), (screeny/1080) loadstring(exports.dgs:dgsImportFunction())() ------groveWindow STREET------------- local markergrove = createMarker ( 2498.9873046875, -1685.6142578125, 13.446597099304 -1,"cylinder", 1.5, 0 ,255 ,0 ,170) groveWindow= dgsCreateWindow (sx*20, sy*300, sx*300, sy*400, "GROVE STREET", true, tocolor(0 ,0 ,0), sy*30, false, tocolor(0 ,238, 0 ,255), nil, tocolor(28 ,28, 28,120), 5,true) label= dgsCreateLabel(2, 10,100, 90,"BEM VINDO A groveWindow STREET",false,groveWindow) label1= dgsCreateLabel(2, 50,10, 10,"é uma das principais gang de LS",false,groveWindow) label2= dgsCreateLabel(2, 70,20, 20,"A GS é uma gangue de rua",false,groveWindow) label3= dgsCreateLabel(2, 90,20, 20,"afro-americana e uma das mais",false,groveWindow) label4= dgsCreateLabel(2, 110,20, 20,"antigas gangues de rua em LS",false,groveWindow) label5= dgsCreateLabel(2, 160,20, 20,"RIVAIS : BALLAS, VAGOS",false,groveWindow) buttonEntrar = dgsCreateButton(2, 210,100,40,"ENTRAR!", false, groveWindow ) buttonSair= dgsCreateButton(100, 210,100,40,"SAIR!", false, groveWindow ) dgsSetFont ( label, "sans" ) dgsSetFont ( label1, "sans" ) dgsSetFont ( label2, "sans" ) dgsSetFont ( label3, "sans" ) dgsSetFont ( label4, "sans" ) dgsSetFont ( label5, "default-bold" ) addEventHandler ("onClientMarkerHit",root, function () if (source == markergrove) then dgsSetVisible(groveWindow,false) showCursor(true) end end)
  19. I was wondering how I can be making a weapon shader script, like an ak 47 with several different skins, examples (one camouflaged skin, one red and such)
  20. Eu queria saber como eu posso estar fazendo um script de shader em armas , tipo uma ak 47 com varias skins diferentes , exemplos ( uma skin camuflada , outra vermelha e tals )
  21. eu queria ta usando o weapon selector , mas so ele sem a hud default do mta queria saber se tem como eu fazer isso ?
  22. MaRcell

    LOGIN BUG

    but it is not dx and framework / =
  23. MaRcell

    LOGIN BUG

    My login does not appear on the screen. LINK https://ibb.co/n1visR local super = Class("Login", Container3D, function() static.getInstance = function() return LuaObject.getSingleton(static) end end).getSuperclass() function Login:paintComponent(g) local x, y = self:getLocationOnScreen() local w = self.width local h = self.height g:drawSetColor(self:getBackground()) g:drawFilledRect(x, y, w, h) super.paintComponent(self, g) end function Login:init() super.init(self) self:setStylesheet(StylesheetParser():parsestr([[ button { color: #000000; background-color: #B5E61E; cursor: pointer; } button:hover { color: #FFFFFF; background-color: #467C00; cursor: pointer; } ]])) self:setBounds(459, 216, 448, 310) self:setBackground(tocolor(80, 80 ,80, 200)) self.subPanel = Panel() self.subPanel:setBackground(tocolor(0, 135, 239 ,200)) self.subPanel:setBounds(0,0, 448, 50) self:add(self.subPanel) self.labelInfo = Label() self.labelInfo:setForeground(tocolor(255,255,255)) self.labelInfo:setBackground(tocolor(0, 0, 0)) self.labelInfo:setScale(2.0) self.labelInfo:setText("MTA Torcidas") self.labelInfo:setAlignment(Label.CENTER) self.labelInfo:setBounds(0,0, 448, 50) self:add(self.labelInfo) self.labelUser = Label() self.labelUser:setForeground(tocolor(255,255,255)) self.labelUser:setBackground(tocolor(0, 0, 0)) self.labelUser:setScale(2.0) self.labelUser:setText("Login:") self.labelUser:setAlignment(Label.LEFT) self.labelUser:setBounds(10, 60, 100, 50) self:add(self.labelUser) self.labelSenha = Label() self.labelSenha:setForeground(tocolor(255,255,255)) self.labelSenha:setBackground(tocolor(0, 0, 0)) self.labelSenha:setScale(2.0) self.labelSenha:setText("Senha:") self.labelSenha:setAlignment(Label.LEFT) self.labelSenha:setBounds(10, 120, 100, 50) self:add(self.labelSenha) self.userEdit = TextField() self.userEdit:setForeground(tocolor(0,0,0,200)) self.userEdit:setBackground(tocolor(255, 255, 255,200)) self.userEdit:setBounds(110, 60, 300, 50) self:add(self.userEdit) self.senhaEdit = PasswordField() self.senhaEdit:setForeground(tocolor(0,0,0,200)) self.senhaEdit:setBackground(tocolor(255, 255, 255,200)) self.senhaEdit:setBounds(110, 120, 300, 50) self:add(self.senhaEdit) self.loginButton = Button("Logar") self.loginButton:setForeground(tocolor(0,0,0,200)) self.loginButton:setBackground(tocolor(255, 255, 255,200)) self.loginButton:addMouseListener(self) self.loginButton:addActionListener(self) self.loginButton:setBounds(260, 180, 150, 50) self:add(self.loginButton) self.registerInfo = Label() self.registerInfo:setForeground(tocolor(255,255,255)) self.registerInfo:setBackground(tocolor(0, 0, 0)) self.registerInfo:setScale(2.0) self.registerInfo:setText("Não tem conta?") self.registerInfo:setAlignment(Label.LEFT) self.registerInfo:setBounds(10, 250, 100, 50) self:add(self.registerInfo) self.registerButton = Button("Registre - se") self.registerButton:setForeground(tocolor(0,0,0,200)) self.registerButton:setBackground(tocolor(255, 255, 255,200)) self.registerButton:addMouseListener(self) self.registerButton:addActionListener(self) self.registerButton:setBounds(260, 250, 150, 50) self:add(self.registerButton) self:setVisible(false) return self end Toolkit.getInstance():add(Login.getInstance()) function Login:actionPerformed(e) if (e.source == self.loginButton) then local username = self.userEdit:getText() -- puxa texto edit do login: exemplo Shinigami local password = self.senhaEdit:getText() -- puxa a senha texto no senha: 123456 if (username ~= "") and (password ~= "") then -- se o edit de user e o edit de senha não estive em branco então triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) else outputChatBox("Digite o login e a senha!", 255, 0, 0, false) end playSoundFrontEnd(6) elseif (e.source == self.registerButton) then local username = self.userEdit:getText() -- puxa texto edit do login: exemplo Shinigami local password = self.senhaEdit:getText() -- puxa a senha texto no senha: 123456 if (username ~= "") and (password ~= "") then -- se o edit de user e o edit de senha não estive em branco então triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) else outputChatBox("Digite o login e a senha!", 255, 0, 0, false) end playSoundFrontEnd(6) end end function Login:mouseEntered(e) -- isso aqui é uma função metodo por que ela Login: a partir do momento que tem Login: vc ta acessando o self if (e.source == self.loginButton) or (e.source == self.registerButton) then playSoundFrontEnd(3) end end function joinLogin() fadeCamera(true) setCameraMatrix(1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) Login.getInstance():setVisible(true) showCursor(true) end addEvent("joinLogin", true) addEventHandler("joinLogin", getRootElement(), joinLogin) function hideLoginWindow() exports.painelGTO:showGUItimes() Login.getInstance():setVisible(false) showCursor(false) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) function hideRegisterWindow() exports.painelGTO:showGUItimes() Login.getInstance():setVisible(false) showCursor(false) end addEvent("hideRegisterWindow", true) addEventHandler("hideRegisterWindow", getRootElement(), hideRegisterWindow)
×
×
  • Create New...