Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You must use this scripting function: removeWorldModel
  2. Castillo

    help hud

    I'm not sure if you can do that, maybe using shaders. You can also make custom HUD's with all the GUI/DX functions MTA provides.
  3. Castillo

    Aviso Logueo

    dxDrawText es solo client side, y ademas se usa con onClientRender.
  4. Castillo

    Skin select

    skiny = { 0, 24, 26, 44, 432 } index = 0 addEventHandler ( "onClientGUIClick", getRootElement(), function ( ) if ( source == prawobutt ) then index = ( index + 1 ) if ( skiny [ index ] ) then guiSetText ( skinidbutt, skiny [ index ] ) else index = 1 guiSetText ( skinidbutt, skiny [ index ] ) end end end ) Try that.
  5. Solo para que sepas, no agrege comillas y comas nada mas. De nada.
  6. addEventHandler("onClientDoubleClick", root, use, true) addEventHandler("onClientGUIClick", button, close) Ahi es el problema, te olvidaste de poner en 'false' cuarto argumento de addEventHandler. addEventHandler ( "onClientDoubleClick", root, use, false ) addEventHandler ( "onClientGUIClick", button, close, false )
  7. You must use: setElementInterior instead of setElementPosition, like this: function motel (thePlayer) setElementInterior ( thePlayer, 0, 2216.3332844, -1150.5032888, 1025.732323227 ) outputChatBox ( "O player ".. getPlayerName(thePlayer) .." Foi para o Motel Vá tambem (/motel)", root, 0, 255, 0 ) end addCommandHandler ( "motel", motel ) Change: '0' to the interior ID of your map.
  8. Eso es porque el cliente aun no se cargo. local sounds = "sounds/sirena.mp3" function musica ( ) sound = playSound ( sounds ) setSoundVolume ( sound, 0.5 ) end addEventHandler ( "onClientResourceStart", resourceRoot, musica )
  9. local sounds = "sounds/sirena.mp3" function checkeo ( ) triggerClientEvent ( "reproducir", getRootElement(), sounds ) end addEventHandler( "onResourceStart", resourceRoot, checkeo )
  10. Castillo

    Se puede?

    Es: setPedArmor no setPedArmour.
  11. function adminChat ( thePlayer, commandName, ... ) local text = table.concat ( { ... }, " " ) local playerName = getPlayerName ( thePlayer ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local account = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ( "user.".. account, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user.".. account, aclGetGroup ( "SuperModerator" ) ) ) then outputChatBox ( "#FF0000[#CCCCCCAdmin#FF0000] #FF0000".. playerName .."#CCCCCC: #FF0000".. text, player, 255, 255, 255, true ) end end end addCommandHandler ( "achat", publicChat )
  12. https://wiki.multitheftauto.com/wiki/ConvertNumber Con esa funcion tambien lo podes hacer. Respecto al error, talves el script lo uso como numero, y al agregarle la coma ya no sirve.
  13. Si, eso es una manera. P.D: Tenes un par de errores: function comando ( player, comand, state ) if ( state == "abrir" ) then moveObject ( ) elseif ( state == "cerrar" ) then moveObject ( ) else outputChatBox ( "Syntaxis: /comando (abrir/cerrar)", player, 255, 0, 0 ) end end addCommandHandler ( "puerto", comando )
  14. function sayMessage ( source, command, ... ) local theText = { ... } local text = table.concat ( theText, " " ) local playerAcc = getPlayerAccount ( source ) if ( theText ) then if ( text ~= "" ) then for _, group in ipairs ( { "Admin", "Moderator", "SuperModerator", "Fundador", "VIP" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( playerAcc ), aclGetGroup ( group ) ) then outputChatBox ( "-> #FF0000Atencion: #FF4444".. text, root, 0, 153, 255, true ) break end end else outputChatBox ( "-> #FF4444Escribe el mensaje", source, 0, 153, 255, true ) end end end addCommandHandler ( "atencion", sayMessage ) Con eso deberia funcionar.
  15. Solo si el jugador esta en todos esos grupos funcionara el comando, no se si eso es lo que querias.
  16. You can't warp him because the vehicle is created client side, so the server doesn't know about it. Create the vehicle server side.
  17. aclGetGroup solo obtiene un grupo por ves, necesitas hacer un loop.
  18. Castillo

    gridlist

    function addplaylist ( ) if ( guiGetText ( edit1 ) ~= "" ) then local row = guiGridListAddRow ( gridlist1 ) guiGridListSetItemText ( gridlist1, row, column1, guiGetText ( edit1 ), false, false ) guiSetText ( edit1, "" ) end end addEventHandler ( "onClientGUIClick", button1, addplaylist, false ) function removeplaylist ( ) if ( guiGridListGetSelectedItem ( gridlist1 ) ~= -1 ) then local row, column = guiGridListGetSelectedItem ( gridlist1 ) guiGridListRemoveRow ( gridlist1, row ) end end addEventHandler ( "onClientGUIClick", button6, removeplaylist, false ) Error was here: addEventHandler(onClientGUIClick, button1, addplaylist()) addEventHandler(onClientGUIClick, button6, removeplaylist()) Should have been: addEventHandler ( "onClientGUIClick", button1, addplaylist, false ) addEventHandler ( "onClientGUIClick", button6, removeplaylist, false )
×
×
  • Create New...