Jump to content

brunob22

Members
  • Posts

    159
  • Joined

  • Last visited

Everything posted by brunob22

  1. you code dont work. no erro. change code.. addEvent("b2.deletarcarro", true) addEventHandler("b2.deletarcarro", getRootElement(), function(deletarcarro1,xx,yy,zz) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then if deletarcarro1 then for i , v in pairs (getElementsByType("vehicle")) do if getElementModel (v) == getVehicleModelFromName (tostring (deletarcarro1)) then local x,y,z = getElementPosition( v ) if x == tonumber(xx) or y == tonumber(yy) or z == tonumber(zz) then destroyElement(v) end end end end end end) punch it only deletes if you have one car on spawn
  2. Explain your problem better , you can't destroy a string; vehicle it's an element -- server side addEvent("b2.deletarcarro", true) addEventHandler("b2.deletarcarro", getRootElement(), function(deletarcarro1) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then if deletarcarro1 then for i , v in pairs (getElementsByType("vehicle")) do if getElementModel (v) == getVehicleModelFromName (tostring (deletarcarro1)) then destroyElement(v) end end end end end ) nice code.. your coding delete all car with the same name is not the only one
  3. I do not want to delete the text, but the car he generate the gridlist
  4. tenho o seguinte erro Bad argument @ 'destroyElement' [Expected element at argument 1, got string 'Bobcat'] client side: elseif(source == deletarcarro) then local deletarcarro1 = guiGridListGetItemText(carrolista, guiGridListGetSelectedItem(carrolista), 1) triggerServerEvent( "b2.deletarcarro",localPlayer, deletarcarro1) server side addEvent("b2.deletarcarro", true) addEventHandler("b2.deletarcarro", getRootElement(), function(deletarcarro1) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) and deletarcarro1 then destroyElement( deletarcarro1 ) end end) the function and delete the generated car gridlist sorry bad ingles =(
  5. Hello would like someone help me open up this gui I tried everything and could not if someone suber and tell me I would be very grateful my code padrao = {} b2mtadayz = {} GUIEditor = { staticimage = {}, combobox = {} } botao = {} b2 = {} padrao = {} addEventHandler("onClientResourceStart", resourceRoot, function() b2.windows = guiCreateWindow(180, 63, 996, 712, "PAINEL VIP B2 MTA DAYZ 1.0", false) guiWindowSetSizable(b2.windows, false) guiSetAlpha(b2.windows, 0.81) botao.sair = guiCreateButton(33, 640, 939, 62, "SAIR DO PAINEL VIP", false, b2.windows) guiSetFont(botao.sair, "default-bold-small") padrao.botao2 = guiCreateButton(20, 256, 252, 45, "", false, b2.windows) padrao.botao1 = guiCreateButton(20, 201, 252, 45, "", false, b2.windows) GUIEditor.combobox[1] = guiCreateComboBox(312, 320, 332, 202, "", false, padrao.botao1) b2mtadayz.label = guiCreateLabel(33, 613, 929, 17, "PAINEL VIP 1.0 FEITO POR: B2 MTA DAYZ", false, b2.windows) GUIEditor.staticimage[1] = guiCreateStaticImage(10, 19, 976, 136, ":Painel-VIPv2/Arquivos/Logo.png", false, b2.windows) padrao.botao3 = guiCreateButton(20, 311, 252, 45, "", false, b2.windows) padrao.botao5 = guiCreateButton(20, 423, 252, 45, "", false, b2.windows) padrao.botao4 = guiCreateButton(20, 366, 252, 45, "", false, b2.windows) padrao.botao6 = guiCreateButton(20, 478, 252, 45, "", false, b2.windows) padrao.botao7 = guiCreateButton(20, 533, 252, 45, "", false, b2.windows) end ) -- exit addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == botao.sair) then guiSetVisible(b2.windows,false) showCursor(false) end end )
×
×
  • Create New...