Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Help - DX

    local newText = "" local r, g, b = 255, 0, 0 function dxDrawCenteredText ( text, r, g, b ) newText = text or "Failed" r = tonumber ( r ) or 255 g = tonumber ( g ) or 0 b = tonumber ( b ) or 0 if ( not isTimer ( newDxTimer ) ) then addEventHandler ( "onClientRender", root, startCentredText ) newDxTimer = setTimer ( function ( ) removeEventHandler ( "onClientRender", root, startCentredText ) end, 5000, 1 ) end end addEvent ( "message:centerText", true ) addEventHandler ( "message:centerText", root, dxDrawCenteredText ) function startCentredText ( ) local rx, ry = guiGetScreenSize ( ) dxDrawBorderedText ( newText, 0, 0, rx, ry, tocolor ( r, g, b, 255 ), 5, "sans", "center", "center", false, false, true ) end addCommandHandler ( "test2", function ( ) dxDrawCenteredText ( "Testing", 255, 255, 0 ) end ) function dxDrawBorderedText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) local wh = 4 dxDrawText ( text, x - wh, y - wh, w - wh, h - wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + wh, y - wh, w + wh, h - wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - wh, y + wh, w - wh, h + wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + wh, y + wh, w + wh, h + wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - wh, y, w - wh, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + wh, y, w + wh, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - wh, w, h - wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + wh, w, h + wh, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end Try it.
  2. Isn't that the normal dxscoreboard but changed the settings?
  3. Castillo

    JoinSound

    playSound is only client side, and your script is server side.
  4. Castillo

    PLS help

    Add each ped element into a table, then on your "onClientPedDamage" event, check if the ped is on the table, if is not, cancel the event.
  5. Castillo

    Table .

    You must also use: setCameraTarget
  6. Castillo

    Table .

    Where do you get that message?
  7. So, if the message is not 911 it cancels the event? that doesn't make any sense.
  8. Castillo

    Table .

    Try checking what "ped" returns server side.
  9. Castillo

    Table .

    I just noticed, your table is wrong, use this: local GroveIDs = { [ 105 ] = true, [ 106 ] = true, [ 107 ] = true }
  10. Castillo

    Table .

    The "if" check must be returning false.
  11. That error means that there was something on the code that caused it to run infinite times.
  12. You can also use this: guiSetInputMode ( "no_binds_when_editing" )
  13. No, you can't make the combo box to go out of the parent element ( as far as I know ).
  14. Castillo

    PLS help

    Try cancelling the event if the attacker isn't the owner of these peds.
  15. I would recommend using the built-on mysql functions from MTA. dbConnect dbExec dbQuery dbPoll dbFree
  16. Castillo

    DM Levels

    This is not for zombie server, this is for any kind of server, the thing is, you gotta know how it works.
  17. Castillo

    My Server.

    You should start a game mode, "play" is the default one.
  18. Castillo

    PC info

    Here you go: https://wiki.multitheftauto.com/wiki/DxGetStatus
×
×
  • Create New...