Erknneto

Members
  • Content count

    22
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Erknneto

  • Rank
    Civilian
  • Birthday 29/03/98

Details

  • Gang
    MTA Evo:Rust
  • Location
    Brazil
  • Occupation
    Scripter
  • Interests
    Women

Recent Profile Visitors

204 profile views
  1. [HELP] DX Bug

    It's working perfectly now, thanks!
  2. [HELP] DX Bug

    Hi! I have a problem with my DX script. I made a DX screen that gets the items in a table and display it on the rectangle The problem is, it's multiplying everything that is related with the text. This is how the issue looks in game, look at the rectangle with the texts, it's multiplying everything! And here is my code: ------------------------------------------------------- local itemList = { {"Wooden Wall"}, {"Wooden Doorway"}, {"Wooden Window"}, {"Wooden Floor"}, {"Wooden Floorport"}, {"Wooden Stairs"}, {"Wooden Fence"}, {"Wooden Door"}, {"Wooden Gate"}, {"Metal Wall"}, {"Metal Doorway"}, {"Metal Window"}, {"Metal Floor"}, {"Metal Floorport"}, {"Metal Stairs"}, {"Metal Fence"}, {"Metal Door"}, {"Metal Gate"}, {"Concrete Wall"}, {"Concrete Doorway"}, {"Concrete Window"}, {"Concrete Floor"}, {"Concrete Floorport"}, {"Concrete Stairs"}, {"Concrete Fence"}, {"Reinforced Door"}, {"Reinforced Gate"}, } ------------------------------------------------------- function returnTableCount (tab) count = 1 if ( getLocalPlayer() ) then for i,item in ipairs(tab) do if ( item ) then count = count + 1 end end return count end return false end ------------------------------------------------------- local totalRows = returnTableCount(itemList) local iRows = totalRows local iVisibleRows = 20 local iCurrentCell = 0 ------------------------------------------------------- local screenWidth,screenHeight = guiGetScreenSize() local screenW, screenH = guiGetScreenSize() local sx,sy = guiGetScreenSize() local px,py = 1366,768 local x,y = (sx/px), (sy/py) ------------------------------------------------------- function isCursorOverRectangle(x,y,w,h) if isCursorShowing() then local mx,my = getCursorPosition() cursorx,cursory = mx*px,my*py if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true end end return false end function drawInventory () if ( getElementData(getLocalPlayer(),"viewingInv") ) then titleTable = dxDrawRectangle(x*050, y*040, x*350, y*45, tocolor(0, 77, 126, 170), false) titleText = dxDrawText("Building",x*060, y*055, x*250, y*30,tocolor(255,255,255, 255)) mainTable = dxDrawRectangle(x*050, y*090, x*350, y*640, tocolor(0, 0, 0, 170), false) for i,item in ipairs(itemList) do for ki = iCurrentCell, iVisibleRows+iCurrentCell-1 do visibleI = ki - iCurrentCell dxDrawRectangle(x*050+x*350, y*090+y*640/iRows*iCurrentCell, 5, y*640/iRows*iVisibleRows) itemBackground = dxDrawRectangle(x*060, y*100+visibleI*31, x*200, y*30, tocolor(0, 0, 0, 200), false) itemText = dxDrawText(item[1],x*070, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) --Problem is here :C useBackground = dxDrawRectangle(x*265, y*100+visibleI*31, x*60, y*30, tocolor(0, 0, 0, 200), false) useText = dxDrawText("Text",x*282, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) dropBackground = dxDrawRectangle(x*330, y*100+visibleI*31, x*60, y*30, tocolor(0, 0, 0, 200), false) dropText = dxDrawText("Text",x*347, y*107+visibleI*31, x*250, y*30,tocolor(255,255,255, 255)) if isCursorOverRectangle(x*060, y*100+visibleI*31, x*200, y*30) or isCursorOverRectangle(x*265, y*100+visibleI*31, x*60, y*30) or isCursorOverRectangle(x*330, y*100+visibleI*31, x*60, y*30) then dxDrawRectangle(x*060, y*100+visibleI*31, x*200, y*30, tocolor(0, 77, 126,20)) dxDrawRectangle(x*265, y*100+visibleI*31, x*60, y*30, tocolor(0, 77, 126,20)) dxDrawRectangle(x*330, y*100+visibleI*31, x*60, y*30, tocolor(0, 77, 126,20)) end end end end end addEventHandler("onClientRender",getRootElement(),drawInventory) function rustCraftScrollUp () if ( getElementData(getLocalPlayer(),"viewingInv") ) then if isCursorOverRectangle(x*050, y*090, x*350, y*640) then iCurrentCell = iCurrentCell - 1 if iCurrentCell < 0 then iCurrentCell = 0 end end end end bindKey("mouse_wheel_up","down",rustCraftScrollUp) function rustCraftScrollDown () if ( getElementData(getLocalPlayer(),"viewingInv") ) then if isCursorOverRectangle(x*050, y*090, x*350, y*640) then iCurrentCell = iCurrentCell + 1 if iCurrentCell > iRows-iVisibleRows then iCurrentCell = iRows-iVisibleRows end end end end bindKey("mouse_wheel_down","down",rustCraftScrollDown) function showInventory () if ( getElementData(getLocalPlayer(),"viewingInv") ) then setElementData(getLocalPlayer(),"viewingInv",false) showCursor(false) showChat(true) else setElementData(getLocalPlayer(),"viewingInv",true) showCursor(true) showChat(false) end end bindKey("k","down",showInventory) How can I get the items in that table 'itemList' and put it in the screen that the dxGridList works without multiplying those stuff? I hope you guys undestand my problem :v pls help
  3. [WANNA BUY] DX Inventory System

    Hello! I wanna buy an Inventory system for my server. I wanna it like this: I want it to be 2 screens. One for the items in the ground and another for the player's items. And I also want a scroll bar (like a gridlist with the items) EVERYTHING ON DXDRAW. Send me your price on a PRIVATE MESSAGE or on my STEAM: steamcommunity.com/id/erknnetobr Sorry for my bad english. I can pay with PAYPAL or a Steam Game.
  4. [HELP] DX functions

    Thanks for your help! I think I understand, I'm going to try, thank you.
  5. [HELP] DX functions

    Thank you! The buttons are working now! But I need one more thing, can you help me with the button getting the right item? It appears on the chat for example "Took Assault Rifle" in the "Map" button. How can I fix it so it can take the Map instead of the Assault Rifle, or like the GPS instead of the AK-47? Here is a screenshot of what I'm trying to do And here is the new code: local newInvItems = { {"Assault Rifle"}, {"AK-47"}, {"Sniper"}, {"Pump Shotgun"}, {"Crossbow"}, {"Custom SMG"}, {"Shotgun"}, {"Semi-Automatic Pistol"}, {"Machete"}, {"5.56 Rifle Ammo"}, {"Sniper Rifle Ammo"}, {"12 Gauge"}, {"Pistol Bullet"}, {"Wooden Arrow"}, {"SMG Ammo"}, {"Apple"}, {"Banana"}, {"Orange"}, {"Tomato"}, {"Cereal Box"}, {"Juice Box"}, {"Milk Bottle"}, {"Water Bottle"}, {"Raw Meat"}, {"Cooked Meat"}, {"Battery"}, {"Gallon (Fuel)"}, {"Gallon (Empty)"}, {"Bottle (Empty)"}, {"Medical Satchel"}, {"Rags"}, {"Cloth"}, {"Gun Powder"}, {"Alcohol Bottle"}, {"Wood"}, {"Metal"}, {"Stone"}, {"Building Tool"}, {"Fishing Rod"}, {"Cannabis Seed"}, {"Cannabis Medicinal"}, {"Sulphur"}, {"Charcoal"}, {"Axe"}, {"Pickaxe"}, {"C4"}, {"Lock"}, {"Map"}, {"GPS"}, {"Watch"}, {"Toolbox"}, {"Medium Backpack"}, {"Large Backpack"}, {"Top Hat"}, {"Witch Hat"}, {"Horn Hat"}, {"Pizza Hat"}, {"Police Hat"}, {"SWAT Hat"}, {"SWAT Armour"}, {"Chicken Head"}, {"Gas Mask"}, {"Eyepatch"}, {"Motorcycle Helmet"}, } local screenW, screenH = guiGetScreenSize() local inventoryLimit = 28 local playerItems = {} inventoryShowing = false function renderInventory () mainTable = dxDrawRectangle(10, (screenH - 583) / 2, 260, 598, tocolor(0, 0, 0, 170), false) lootTable = dxDrawRectangle(10, (screenH - 670) / 2, 260, 38, tocolor(0, 77, 126, 150), false) takeText = dxDrawText("Loot (0/24)",25, (screenH - 644) / 2, 260, 38,tocolor(255,255,255, 255)) rowNumber = 0 for i,item in ipairs(newInvItems) do if ( getElementData(getLocalPlayer(),item[1]) >= 1 ) then if not ( rowNumber > inventoryLimit ) then rowNumber = rowNumber + 1 itemBackground = dxDrawRectangle(20, 85+rowNumber*20, 185, 15, tocolor(0, 77, 126, 150), false) takeBackground = dxDrawRectangle(210, 85+rowNumber*20, 50, 15, tocolor(0, 77, 126, 150), false) itemText = dxDrawText(item[1].." ("..getElementData(getLocalPlayer(),item[1]).."x)",25,85+rowNumber*20,tocolor(255,255,255, 255)) takeText = dxDrawText("Take",221,85+rowNumber*20,tocolor(255,255,255, 255)) end end end end function inventoryClickDetect (button,state,x,y) for i=1,rowNumber do if ( button == "left" ) then if ( state == "down" ) then if ( inventoryShowing ) then if ( x >= 210 and x <= 210 + 50 and y >= 85+i*20 and y <= 85+i*20 + 15 ) then outputChatBox("Took "..newInvItems[i][1]) return end end end end end end function showInventory () if ( inventoryShowing ) then removeEventHandler("onClientRender", root, renderInventory) removeEventHandler("onClientClick",root,inventoryClickDetect) inventoryShowing = false showChat(true) showCursor(false) else addEventHandler("onClientRender", root, renderInventory) addEventHandler("onClientClick",root,inventoryClickDetect) inventoryShowing = true showChat(false) showCursor(true) end end bindKey("K","down",showInventory)
  6. [HELP] DX functions

    Hello everyone. I need some help here. I wan't to create a DX Inventory for my server, with some buttons. I created a script that creates the inventory but only 1 button is working. local newInvItems = { {"Assault Rifle"}, {"AK-47"}, {"Sniper"}, {"Pump Shotgun"}, {"Crossbow"}, {"Custom SMG"}, {"Shotgun"}, {"Semi-Automatic Pistol"}, {"Machete"}, {"5.56 Rifle Ammo"}, {"Sniper Rifle Ammo"}, {"12 Gauge"}, {"Pistol Bullet"}, {"Wooden Arrow"}, {"SMG Ammo"}, {"Apple"}, {"Banana"}, {"Orange"}, {"Tomato"}, {"Cereal Box"}, {"Juice Box"}, {"Milk Bottle"}, {"Water Bottle"}, {"Raw Meat"}, {"Cooked Meat"}, {"Battery"}, {"Gallon (Fuel)"}, {"Gallon (Empty)"}, {"Bottle (Empty)"}, {"Medical Satchel"}, {"Rags"}, {"Cloth"}, {"Gun Powder"}, {"Alcohol Bottle"}, {"Wood"}, {"Metal"}, {"Stone"}, {"Building Tool"}, {"Fishing Rod"}, {"Cannabis Seed"}, {"Cannabis Medicinal"}, {"Sulphur"}, {"Charcoal"}, {"Axe"}, {"Pickaxe"}, {"C4"}, {"Lock"}, {"Map"}, {"GPS"}, {"Watch"}, {"Toolbox"}, {"Medium Backpack"}, {"Large Backpack"}, {"Top Hat"}, {"Witch Hat"}, {"Horn Hat"}, {"Pizza Hat"}, {"Police Hat"}, {"SWAT Hat"}, {"SWAT Armour"}, {"Chicken Head"}, {"Gas Mask"}, {"Eyepatch"}, {"Motorcycle Helmet"}, } local screenW, screenH = guiGetScreenSize() local inventoryLimit = 28 showCursor(true) function renderInventory () mainTable = dxDrawRectangle(10, (screenH - 583) / 2, 260, 598, tocolor(0, 0, 0, 170), false) lootTable = dxDrawRectangle(10, (screenH - 670) / 2, 260, 38, tocolor(0, 77, 126, 150), false) rowNumber = 0 for i,item in ipairs(newInvItems) do if ( getElementData(getLocalPlayer(),item[1]) >= 1 ) then if not ( rowNumber > inventoryLimit ) then rowNumber = rowNumber + 1 itemBackground = dxDrawRectangle(20, 85+rowNumber*20, 185, 15, tocolor(0, 77, 126, 150), false) takeBackground = dxDrawRectangle(210, 85+rowNumber*20, 50, 15, tocolor(0, 77, 126, 150), false) itemText = dxDrawText(item[1].." ("..getElementData(getLocalPlayer(),item[1]).."x)",25,85+rowNumber*20,tocolor(255,255,255, 255)) takeText = dxDrawText("Take",221,85+rowNumber*20,tocolor(255,255,255, 255)) end end end end addEventHandler("onClientRender", root, renderInventory) function inventoryClickDetect (button,state,x,y) if ( button == "left" ) then if ( state == "down" ) then if ( x >= 210 and x <= 210 + 50 and y >= 85+rowNumber*20 and y <= 85+rowNumber*20 + 15 ) then outputChatBox("Test!") end end end end addEventHandler("onClientClick",root,inventoryClickDetect) It creates all buttons and all things, but only the last button created is working. How can I make for every button to work? sorry for my bad english, I'm brazilian
  7. [HELP] OBJECT HEALTH

    Hey, guys. I'm creating a Craft System for my server, but I really need a Helth System for the Object, for example: If a player damage the object with his arm or a weapon the object will lose his health, if the health reaches in 0, the object will be destroyed. I tryed to make it, but I can't, it never destroys the object. Can you guys help me? I really need that. Look what I did: function objDoesntBreak () --THIS FUNCTION WORKS, THE SECOND FUNCTION DOESN'T WORKS! if getElementData(source,"craftedObject") == true then cancelEvent() end end addEventHandler("onClientObjectBreak", root, objDoesntBreak) function objDamageStart () currentHealth = getElementHealth(source) if getElementData(source,"craftedObject") == true then if currentHealth <= 0 then destroyElement(source) end end setElementHealth(source,getElementHealth(source)-20) end addEventHandler("onClientObjectDamage", root, objDamageStart)
  8. Hi guys.. I have a problem in a Linux DayZ MTA Server. If happens everytime when a serverEvent is called... Error: Error: Client (Juquinha) triggered serverside event onPlayerChangeSkin, but event is not marked as remotly triggerable Code: client side elseif itemInfo == "Put clothes on" then triggerServerEvent("onPlayerChangeSkin",getLocalPlayer(),itemName) server side function addPlayerSkin (skin) local current = getElementData(source,"skin") local name = getSkinNameFromID(current) setElementData(source,name,getElementData(source,name)+1) setElementData(source,skin,getElementData(source,skin)-1) local id = getSkinIDFromName(skin) setElementData(source,"skin",id) setPedSkin(source,id) triggerClientEvent(source,"refreshInventoryManual",source) end addEvent("onPlayerChangeSkin",true) addEventHandler("onPlayerChangeSkin",getRootElement(),addPlayerSkin) Can someone help me to solve this problem? I happens only in the linux server.
  9. [Solved] Help with greenzone godmode

    The 'problem' is caused when you check if the element who is entering the area is different than a player (in line 13) just make other check (elseif) to know if it is a vehicle. It works! Thanks dude.
  10. [Solved] Help with greenzone godmode

    Thanks man, it works . But, if I'm out of the vehicle and drag the vehicle outside of the colshape the vehicle will stay with godmode, and if I drag the vehicle inside, the vehicle doesn't will get godmode! But it works anyway, but you know a way to solve this problem?
  11. Hey, sup guys... I need some help with my greenzone godmode system, I created everythink, it's a base protector, but I need a godmode for cars inside the base, I tried, but I can't. Can someone help me? -Just add a godmode for the vehicle if it's inside of the base (colshape) -And add a setting like (godmodeveh = true or false) if you can Server -- // Settings \\ -- shadyisback = createColCuboid(353.8819, 2450.4045, 14.984375, 25.5, 28, 10) --Base location (colshape) local x,y,z = 363.466796875,2495.1606445313,16.484375 --Player teleport location local xc,yc,zc = 325.2177734375,2527.9711914063,25.934555053711 --Car teleport location local groupName = "SkyBreaker" -- Group name local reason = "Você entrou na Área da Base do grupo "..groupName.."." --Kick message kickarplayer = false -- Enable player kick if he got a vehicle (True or False) // Default: False // -- // Settings \\ -- function shadyisbackEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end local gangName = getElementData(thePlayer, "gang") if isPedInVehicle(thePlayer) then --If the invader try to enter with a vehicle if gangName ~= groupName then local vehcara = getPedOccupiedVehicle(thePlayer) if kickarplayer == true then kickPlayer(thePlayer, reason) --Kick the player if 'kickarplayer' = true setElementPosition(vehcara, xc,yc,zc) --Set the vehicle position to a safe place elseif kickarplayer == false then setElementPosition(vehcara, xc,yc,zc) --Set the vehicle position to a safe place end end end if gangName == groupName then --Player enter successfully else setElementPosition(thePlayer, x,y,z) --Set player position to a safe location outputChatBox("Você não é membro do grupo "..groupName.." para entrar nessa base.", thePlayer) --Message on the player's chat end end addEventHandler ( "onColShapeHit", shadyisback, shadyisbackEnter )
  12. Help with a Gui

    It works dude, thanks for your help!
  13. Help with a Gui

    I did this for a test and it didn't worked. addEventHandler ( "onClientGUIClick", getb, getbshow, false ) Client: function getbshow () local player = guiGridListGetSelectedItem(playerList) local playername = guiGridListGetItemText(playerList, player, 1) triggerServerEvent("getAccountDataShow", getLocalPlayer(), playername) end Server: function getAccountDataShow(playername) local player = getPlayerFromName(playername) name = getPlayerName(player) killPed(player) end addEvent("getAccountDataShow", true) addEventHandler("getAccountDataShow", getRootElement(), getAccountDataShow)
  14. Help with a Gui

    Hi, I'm Erknneto, i'm from Brazil. Sorry for my bad english. Anyway.. I created a gui with some buttons, but the gui file is Client and the buttons functions are Server. How can I make a function for all buttons on Server File? Client file: function accountGui () local screenW, screenH = guiGetScreenSize() showCursor(true) janela = guiCreateWindow((screenW - 376) / 2, (screenH - 385) / 2, 376, 385, "Account Manager", false) guiWindowSetMovable(janela, false) guiWindowSetSizable(janela, false) ----------------------------------- local playerList = guiCreateGridList(10, 43, 157, 332, false, janela) local column = guiGridListAddColumn(playerList, "Players logged in", 0.9) ----------------------------------- if ( column ) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end end ----------------------------------- managerLabel = guiCreateLabel(211, 42, 100, 15, "Account manager:", false, janela) ----------------------------------- deleteb = guiCreateButton(177, 67, 189, 36, "DELETE ACCOUNT", false, janela) resetb = guiCreateButton(177, 108, 189, 36, "RESET ACCOUNT", false, janela) getb = guiCreateButton(177, 149, 189, 36, "GET ACCOUNT DATA", false, janela) setb = guiCreateButton(177, 191, 189, 36, "SET ACCOUNT DATA", false, janela) kickb = guiCreateButton(177, 231, 189, 36, "KICK PLAYER", false, janela) closeb = guiCreateButton(178, 325, 188, 25, "CLOSE", false, janela) infob = guiCreateButton(177, 296, 188, 25, "INFO", false, janela) ----------------------------------- byerknneto = guiCreateLabel(177, 360, 56, 15, "By Erknneto", false, janela) guiSetFont(byerknneto, "default-small") ----------------------------------- addEventHandler ( "onClientGUIClick", infob, infobshow, false ) addEventHandler("onClientPlayerJoin", getRootElement(), refreshGui) addEventHandler("onClientPlayerQuit", getRootElement(), refreshGui) ----------------------------------- addEventHandler ( "onClientGUIClick", closeb, function() guiSetVisible(janela, false) guiSetVisible(infogui, false) removeEventHandler("onClientPlayerJoin", getRootElement(), refreshGui) removeEventHandler("onClientPlayerQuit", getRootElement(), refreshGui) showCursor(false) end, false) ----------------------------------- end addCommandHandler("mybum", accountGui) function refreshGui () guiGridListClear ( playerList ) for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end end function infobshow () ----------------------------------- infogui = guiCreateWindow(110, 189, 375, 299, "Info", false) guiWindowSetMovable(infogui, false) guiWindowSetSizable(infogui, false) ----------------------------------- infoshihi = guiCreateMemo(14, 28, 351, 214, "Resource created by Erknneto from Evolution DayZ.\n\n-Delete an account\n-Reset an account\n-Get an account data\n-Set an account data\n-Kick the player's account\n\nDownloaded from MTAZ.\nSkype: erknnetogames\nevodayz.com // Ernani - Erknneto //", false, infogui) guiMemoSetReadOnly(infoshihi, true) ----------------------------------- closebinfo = guiCreateButton(14, 252, 348, 32, "Close", false, infogui) ----------------------------------- addEventHandler ( "onClientGUIClick", closebinfo, function() guiSetVisible(infogui, false) end, false) ----------------------------------- end Print: http://puu.sh/jugV9/b239678ae7.png I just want to make the functions for all buttons, like.. when you click in the Get Account Data button it says on your chat things like his blood, position, murders, etc. In the server file. Help, please
  15. Erro de Scripts no Linux, ajudem!

    Mas não tem nada multiplicado e no windows funciona tudo normal, sem problema nenhum.