Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Chat box

    Go to MTA settings > Interface.
  2. It'll be placed last if I'm right.
  3. That's a highly inefficient code.
  4. No, it'll be gone as far as I know.
  5. You must check if the element that hit the marker is the local player. addEventHandler("onClientMarkerHit", resourceRoot, function ( hitElement ) if ( hitElement == localPlayer ) then -- Here. panel = guiCreateWindow(363, 122, 640, 424, "Drug Dealers", false) guiWindowSetSizable(panel, false) informacion = guiCreateMemo(19, 26, 602, 329, "It is a criminal Job that Gives you Some rights like Sell Drugs, Rob Stores and More things If you want to accept this job you must Press Accept If you don't Want to accept this job Press Cancel.", false, panel) aceptar = guiCreateButton(19, 363, 220, 51, "Accept", false, panel) guiSetFont(aceptar, "default-bold-small") cerrar = guiCreateButton(401, 363, 220, 51, "Cancel", false, panel) guiSetFont(cerrar, "default-bold-small") showCursor(true) addEventHandler ("onClientGUIClick", aceptar, aceptarr, false ) addEventHandler ("onClientGUIClick", cerrar, cerrarr, false ) end end ) function aceptarr() showCursor (false) guiSetVisible ( panel, not guiGetVisible ( panel ) ) end addEventHandler( "onClientGUIClick",aceptarr, true ) function cerrarr() showCursor (false) guiSetVisible (panel, not guiGetVisible ( panel ) ) end addEventHandler ("onClientGUIClick", cerrarr, true)
  6. You'll have to compare the local player to the player you want to show it to.
  7. That function will trigger onPlayerLogin, I don't see what's the problem.
  8. addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do -- Loop all the players. bindKey ( player, "U", "down", "chatbox", "GangChat" ) -- Bind the key "U" to the "GangChat" command. end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "U", "down", "chatbox", "GangChat" ) -- Bind the key "U" to the "GangChat" command. end ) function gangChat ( thePlayer, _, ... ) local text = table.concat ( { ... }, " " ) if ( #text > 0 ) then outputChatBox ( text, thePlayer ) end end addCommandHandler ( "GangChat", gangChat )
  9. You can try this one: https://community.multitheftauto.com/in ... ls&id=6380
  10. You can put that when the player enters a specified interior, it disables sounds, and when exit, it re-enables them again.
  11. Use this useful function to make the ped face the target: https://wiki.multitheftauto.com/wiki/FindRotation and: setPedRotation
  12. Well, I guess you should either find a way to fix that or contact the author.
  13. Are you talking about a new chat system or editing a current chat command? You can bind keys to the player to act like "T" and "Y" keys. bindKey ( thePlayer, "U", "down", "chatbox", "Local Chat" )
  14. https://wiki.multitheftauto.com/wiki/Se ... ndsEnabled It's global though.
  15. I'm not sure if that will work, if I'm right, you can't replace the CJ clothes itself, but you can use shaders to make your "own" clothes.
  16. Yo diria que estas tocando el marker 4 veces, por lo que puede que haya varios markers en el mismo lugar.
  17. Use the server side text functions. https://wiki.multitheftauto.com/wiki/Se ... _functions
  18. onClientSoundChangedMeta use that event.
  19. local tele = createMarker ( -473, -512.7001953125, 24.5, 'cylinder', 2, 0, 89, 97, 255 ) function Teleport ( player, matchingDimension ) if ( getElementType ( player ) == "player" ) then if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "TLAT" ) ) then local element = ( isPedInVehicle ( player ) and getPedOccupiedVehicle ( player ) or player ) setElementPosition ( element, 3239.3999023438, 253.19999694824, 19 ) end end end addEventHandler ( "onMarkerHit", tele, Teleport )
×
×
  • Create New...