Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. That's because you didn't add the rows.
  2. That's because you forgot the GUIeditor table, which you can notice by using the debugscript. local sWidth, sHeight = guiGetScreenSize ( ) local entrada = createMarker ( 2790.69849, -1618.30640, 15.35537, "cylinder", 1.5, 255, 255, 0, 170 ) local isPlayerRending = false local GUIEditor = { gridlist = { }, button = { }, label = { } } function main ( hitElement ) if ( hitElement ~= localPlayer ) then return end setTimer ( function ( ) if ( not isPlayerRending ) then addEventHandler ( "onClientRender", root, render ) end GUIEditor.gridlist[1] = guiCreateGridList(sWidth*0.394, sHeight*0.236, sWidth*0.252, sHeight*0.296, false) guiGridListAddColumn(GUIEditor.gridlist[1], "Armas", 0.9) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Uzi", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Tec-9", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Sniper", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Shotgun", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "Satchel", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "Recortada", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "Rifle", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "Paracaidas", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 8, 1, "MP5", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 9, 1, "M4", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 10, 1, "Knife", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 11, 1, "Katana", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 12, 1, "Grenade", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 13, 1, "Desert Eagle", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 14, 1, "Combat Shotgun", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 15, 1, "Colt", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 16, 1, "Chainsaw", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 17, 1, "AK-47", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 18, 1, "Visores Nocturnos", false, false) GUIEditor.button[1] = guiCreateButton(sWidth*0.699, sHeight*0.466, sWidth*0.235, sHeight*0.049, "Comprar", false) GUIEditor.label[4] = guiCreateLabel(sWidth*0.718, sHeight*0.371, sWidth*0.190, sHeight*0.017, "Nombre: ---", false) GUIEditor.label[5] = guiCreateLabel(sWidth*0.718, sHeight*0.389, sWidth*0.190, sHeight*0.015, "Municiones: ---", false) GUIEditor.label[7] = guiCreateLabel(sWidth*0.718, sHeight*0.410, sWidth*0.190, sHeight*0.016, "Nivel: ---", false) GUIEditor.label[8] = guiCreateLabel(sWidth*0.718, sHeight*0.424, sWidth*0.190, sHeight*0.021, "Precio: ---", false) muestra = guiCreateStaticImage(sWidth*0.717, sHeight*0.234, sWidth*0.191, sHeight*0.126, ":admin/client/images/info.png", false) end ,5000, 1 ) end addEventHandler ( "onClientMarkerHit", entrada, main ) function render ( ) isPlayerRending = true dxDrawText("Tienda de Armas", sWidth*0.580, sHeight*0.189, sWidth*0.893, sHeight*0.215, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(sWidth*0.384, sHeight*0.219, sWidth*0.567, sHeight*0.332, tocolor(0, 0, 0, 240), false) dxDrawRectangle(sWidth*0.384, sHeight*0.194, sWidth*0.567, sHeight*0.025, tocolor(4, 75, 74, 240), false) end
  3. Castillo

    help script

    Yes, I can read what he said, but that script he posted doesn't has 1320 lines, it has 38, so my question is obvious, which line in that script corresponds to the line 1320 from the whole script?
  4. Since is a client side script, you must use "onClientMarkerHit".
  5. Castillo

    help script

    At which line? because the one you posted doesn't match.
  6. This may help: viewtopic.php?f=148&t=42067
  7. Castillo

    Help!

    That's because you forgot to define 'txd' and 'dff' variables. outputChatBox ( "> replacing the bmx vehicle" ) txd = engineLoadTXD ( "bmx.txd" ) -- Here engineImportTXD ( txd, 481 ) dff = engineLoadDFF ( "bmx.dff", 481 ) -- And here engineReplaceModel ( dff, 481 )
  8. function capitalAfterSpace ( str ) local splitted = split ( str, " " ) local total = #splitted local found = 0 local index = 1 while splitted [ index ] do if isStringFirstLetterUppercase ( splitted [ index ] ) then found = ( found + 1 ) end index = ( index + 1 ) end return ( total == found ) end function isStringFirstLetterUppercase ( str ) local letter = str:sub ( 1, 1 ) return ( letter:upper ( ) == letter ) end outputChatBox ( tostring ( capitalAfterSpace ( "Test Test" ) ) ) -- returns: true outputChatBox ( tostring ( capitalAfterSpace ( "Test test" ) ) ) -- returns: false outputChatBox ( tostring ( capitalAfterSpace ( "Test Test Test" ) ) ) -- returns: true outputChatBox ( tostring ( capitalAfterSpace ( "Test Test test" ) ) ) -- returns: false
  9. This guy obviously doesn't understand what people tells him. Topic locked.
  10. This isn't a request forum, you must learn to make it by yourself or pay someone to do it for you.
  11. -- client side: GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(2, 2, 798, 598, "MTA TORCIDAS 1.0", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.staticimage[1] = guiCreateStaticImage(185, 35, 452, 119, ":paineltimes/pluss.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(564, 303, 39, 40, ":paineltimes/figueirense.png", false, GUIEditor.staticimage[1]) GUIEditor.label[1] = guiCreateLabel(261, 164, 446, 55, "Selecione seu time", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-gothic") GUIEditor.button[1] = guiCreateButton(29, 340, 122, 39, "Botafogo", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") guiSetFont(GUIEditor.label[2], "sa-header") addEventHandler('onClientGUIClick',GUIEditor.button[1],setSkin,false) GUIEditor.staticimage[23] = guiCreateStaticImage(163, 243, 39, 31, ":paineltimes/corintians.png", false, GUIEditor.window[1]) showCursor(true) guiSetVisible(window,true) end ) bindKey ( "F2", "down", function ( ) local tostate = not guiGetVisible ( GUIEditor.window[1] ) guiSetVisible ( GUIEditor.window[1], tostate ) showCursor ( tostate ) end ) function setSkin ( ) triggerServerEvent('LoadServer',localPlayer) guiSetVisible (GUIEditor.window[1], false) showCursor (false) outputChatBox("Bem vindo ao botafogo!") end -- server side: addEvent('LoadServer',true) addEventHandler('LoadServer',root, function ( ) setElementPosition ( source,1479.6, -1612.8, 14.0 ) setElementModel ( source,0 ) end )
  12. It works, I pressed the button and it set my skin to 0 and teleported.
  13. Probe y nada :I Postea el meta.xml.
  14. Castillo

    Help :(

    I told you on a ped not on the localPlayer please bro Give me ped They are the same for any element.
  15. -- client side: function healthP ( attacker, weapon, bodypart, loss ) if ( attacker and getElementType ( attacker ) == "ped" and weapon == 8 ) then triggerServerEvent ( "killZombie", localPlayer, source ) end end addEventHandler ( "onClientPedDamage", getRootElement(), healthP ) -- server side: addEvent ( "killZombie", true ) addEventHandler ( "killZombie", root, function ( zombie ) killPed ( zombie ) end )
  16. Usa triggerServerEvent.
  17. killPed es server side, onClientPedDamage client side.
  18. Serviria Tambien que al atacar a un zombie el zombie muera? No, tendrias que hacér otro. Talvéz con un loop para los peds. Un loop? para que? puede usar "onClientPedDamage".
  19. Castillo

    Help :(

    You need the following functions: getElementPosition getCameraMatrix getDistanceBetweenPoints3D getScreenFromWorldPosition dxDrawText Event: onClientRender
  20. GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(2, 2, 798, 598, "MTA TORCIDAS 1.0", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.staticimage[1] = guiCreateStaticImage(185, 35, 452, 119, ":paineltimes/pluss.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(564, 303, 39, 40, ":paineltimes/figueirense.png", false, GUIEditor.staticimage[1]) GUIEditor.label[1] = guiCreateLabel(261, 164, 446, 55, "Selecione seu time", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-gothic") GUIEditor.button[1] = guiCreateButton(29, 340, 122, 39, "Botafogo", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") guiSetFont(GUIEditor.label[2], "sa-header") addEventHandler('onClientGUIClick',GUIEditor.button[1],setSkin,false) GUIEditor.staticimage[23] = guiCreateStaticImage(163, 243, 39, 31, ":paineltimes/corintians.png", false, GUIEditor.window[1]) showCursor(true) guiSetVisible(window,true) end ) bindKey ( "F2", "down", function ( ) local tostate = not guiGetVisible ( GUIEditor.window[1] ) guiSetVisible ( GUIEditor.window[1], tostate ) showCursor ( tostate ) end ) function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1479.6, -1612.8, 14.0 triggerServerEvent("movePlayerToBotafogo", getLocalPlayer(), getLocalPlayer(), teleportX, teleportY, teleportZ) showCursor(false) guiSetVisible(GUIEditor.window[1],false) outputChatBox("Bem vindo ao botafogo!") end end addEventHandler("onClientGUIClick", root, teleportPlayer) function setSkin ( ) triggerServerEvent('LoadServer',localPlayer) guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor (false) outputChatBox("Bem vindo ao botafogo!") end
  21. I said the whole script, it can't be just that part.
  22. Castillo

    Anuncios

    local lista = { "Visita Nuestro Foro: #ffd200www.fgpmta.com", "Lideres Del Clan: #ffd200Viper - elMota", "Buymap: #ffd200'u' - #FFFFFFHidden:#ffd200 'o'" } setTimer ( function ( ) outputChatBox ( "#ffd200-[FgP]- #ffffff".. lista [ math.random ( 1, #lista ) ], root, 0, 0, 0, true ) end ,20000, 0 ) Si no usas una funcion, te dara siempre el mismo mensaje.
  23. You can use this resource for fast replacing of weapons, vehicles and skins: https://community.multitheftauto.com/in ... ls&id=3016 and the script part to replace model too: type="misc" name="Texture eplacement for ped ID: 148" author="Unknown" description="" version="1" /> "148.txd" /> "148.dff" /> txd = engineLoadTXD("148.txd") engineImportTXD(txd, 148) dff = engineLoadDFF("148.dff") engineReplaceModel(dff, 148) -- generated with [url=http://mta.dzek.eu/]http://mta.dzek.eu/[/url]
×
×
  • Create New...