Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. function acceptedNames ( element ) local text = guiGetText ( element ):gsub ( "%p", "" ) guiSetText ( element, text ) end addEventHandler ( "onClientGUIChanged", theEdit, acceptedNames, false )
  2. That would remove letters and numbers from the string. To remove all characters from a string use: local myString = "Hello World ^^,-*/-/*/-,." -- Example myString:gsub ( "%p", "" ) You can use the event onClientGUIChanged to detect when the editbox text is changed, so you can remove the characters.
  3. We don't give support with leaked scripts. Topic locked.
  4. Look description https://community.multitheftauto.com/ind ... s&id=11241 Unless MrTasty comes saying that he doesn't want that resource in the community, it can stay, since he clearly stated that the original author was MrTasty.
  5. Postea el nuevo codigo con el error que mencione anteriormente arreglado.
  6. Es "outputChatBox" no "OutputChatBox" Te dije que tengas cuidado al escribir los nombres de las funciones.
  7. Es "thePlayer" no "theplayer", fijate bien que este correctamente escrito, con mayusculas y minusculas. Y te dije "root" no "getrootelement".
  8. No veo en ninguna parte la variable 'source', deberias estar usando 'thePlayer'. Y en outputChatBox, cambia el 'source' por 'root', porque si no enviara el mensaje solamente al jugador que utilizo el comando, no a todo el servidor.
  9. viewtopic.php?f=102&t=68395&p=640019
  10. You have a missing end in the "createVehicleForPlayer" function.
  11. Are you talking about this function? https://wiki.multitheftauto.com/wiki/DxDrawEmptyRec If so, then you must also copy the source code of the function, because it's not a native MTA function.
  12. No es una funcion publica, la hice para alguien hace tiempo y asi quedo, si la queres con el delay de primer argumento, entonces lo cambias.
  13. Hice esta funcion para alguien que tambien me pregunto lo mismo hace tiempo, no se si aun funcionara. local texts = { } function dxDrawTextPerLetter ( text, left, top, right, bottom, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, colorCoded, subPixelPositioning, delay ) if ( not texts [ text ] ) then texts [ text ] = { index = 1, lastUpdate = getTickCount ( ) } end if ( texts [ text ] ) then dxDrawText ( text:sub ( 1, texts [ text ].index ), left, top, right, bottom, color or tocolor ( 255, 255, 255, 255 ), scale or 1, font or "default", alignX or "left", alignY or "top", clip, wordBreak, postGUI, colorCoded, subPixelPositioning ) if ( getTickCount ( ) - texts [ text ].lastUpdate >= ( delay or 60 ) ) then texts [ text ].index = ( texts [ text ].index + 1 ) texts [ text ].lastUpdate = getTickCount ( ) end end end Y para probarla: local sx, sy = guiGetScreenSize ( ) addEventHandler ( "onClientRender", root, function ( ) dxDrawTextPerLetter ( "Testing the function", 0, 0, sx, sy / 2, false, false, false, false, false, false, false, false, false, false, 50 ) end )
  14. That's a custom crosshair, you can do it with: getPedTargetEnd getScreenFromWorldPosition guiGetScreenSize dxDrawImage
  15. And then: See? you named the function the same way as a function you are executing, which causes a infinite loop. Rename: to something else, like "kick".
  16. Castillo

    GUI Help

    That's because you edited the code wrong, you put absolute positions, but you defined the argument as absolute. locationGridList = guiCreateGridList(7, 10, 339, 301,true,spawnWindow) See that 'true'? that means relative positions, but these are absolute, so just change 'true' to 'false', like this: locationGridList = guiCreateGridList(7, 10, 339, 301,false,spawnWindow) And do the same for all the others.
  17. Castillo

    GUI Help

    I don't understand the problem, can you explain it better?
  18. There are exchangers from Paysafecard to Paypal, but they take huge fees ( 35% and above ).
  19. viewtopic.php?f=116&t=86123 You already made a topic about this.
  20. You have to hash the file size of the DFF and TXD, so the script can compare it with the file it already has, and see if they are the same.
×
×
  • Create New...