Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Use this small function: function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) -- Get the player screen resolution local cx, cy = getCursorPosition ( ) -- Get the cursor position local cx, cy = ( cx * sx ), ( cy * sy ) -- Convert relative positions to absolute if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end Then you can do this: addEventHandler ( "onClientClick", root, function ( ) if isMouseInPosition ( 481, 380, 70, 29 ) then outputChatBox ( "CLICKED!" ) end end )
  2. setTimer ( spawnPlayer, 5000, 1, arguments of spawn player goes here ) That will spawn the player after 5 seconds.
  3. Amazing job you all did! Happy new year to the entire team and keep up with the good work!
  4. Use it in conjunction with spawnPlayer.
  5. That's because DX drawing isn't interactive, you need to calculate the current cursor position with the dx rectangle position, and use the event onClientClick.
  6. That's a compiled script, you can't edit it, nor decompile it.
  7. We don't give support with leaked scripts.
  8. Entonces es muy facil, al crear la GUI, le das click derecho sobre el elemento GUI, y cambias de Absolute a Relative.
  9. Como haces para crear tus GUI's? guieditor?
  10. Usa posiciones relativas y no absolutas.
  11. This is the english section, please go to the polish section to speak polish. viewforum.php?f=124
  12. Castillo

    Chatbug

    Change it to 'thePlayer'.
  13. Castillo

    Chatbug

    That error doesn't make any sense, getPlayerAccount expects a player, not an account.
  14. Castillo

    Chatbug

    local function playerChat ( message, messageType ) cancelEvent ( ) if ( messageType == 2 ) then local acc = getPlayerAccount ( source ) if ( not isGuestAccount ( acc ) ) then if ( getAccountData ( acc, "chatc" ) and getElementData ( source, "Vip" ) == true ) then local color = getAccountData ( acc, "chatc" ) local team = getPlayerTeam ( source ) if ( not team ) then return end local r, g, b = getTeamColor ( team ) local name = getPlayerName ( source ) for _, team in ipairs ( getPlayersInTeam ( team ) ) do outputChatBox ( "(ALL): ".. RGBToHex ( r, g, b ) .."".. name ..": ".. ( color and color or "#FFFFFF" ) .."".. message, root, 255, 255, 255, true ) end end end elseif ( messageType == 0 ) then local r, g, b = getPlayerNametagColor ( source ) local name = getPlayerName ( source ) outputChatBox ( "(ALL): ".. RGBToHex ( r, g, b ) .."".. name ..": #FFFFFF".. message, root, 255, 255, 255, true ) outputServerLog ( "CHAT: ".. name ..": ".. message ) end end addEventHandler ( "onPlayerChat", root, playerChat )
  15. Castillo

    Chatbug

    I already told you how to fix that code.
  16. You would need to edit the blips script which is being used by that game mode.
  17. Castillo

    Chatbug

    Post your current code.
  18. Castillo

    Chatbug

    You're welcome.
  19. Castillo

    Chatbug

    You put the wrong message type, 0 = normal, 2 = team.
  20. Castillo

    Chatbug

    I guess you aren't in a team.
  21. Creo que podrias usar este evento: https://wiki.multitheftauto.com/wiki/On ... undStopped
×
×
  • Create New...