Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Tenes que cambiar la setting: "allowColorcodedNames" en el Admin Panel > Resources > scoreboard > Settings.
  2. 1: Ya soy dueño de un servidor. 2: No tengo tiempo para mi propio servidor. 3: No me gustan los servidores latinos, mucho insulto.
  3. Podrias crear una tabla con los serials de cada uno y el skin.
  4. Castillo

    HELP-ME!

    function ElementDimension ( thePlayer, commandName ) if ( commandName == "dm" ) then setElementDimension ( thePlayer, 1 ) outputChatBox ( "Você entrou na Dimensão", thePlayer ) elseif ( commandName == "sairdm" ) then setElementDimension ( thePlayer, 0 ) outputChatBox ( "Você saiu da Dimensão", thePlayer ) end end addCommandHandler ( "dm", ElementDimension ) addCommandHandler ( "sairdm", ElementDimension )
  5. If I'm right, it's inefficient to use one timer for each player, and it's more efficient to loop all players with one timer. setTimer ( function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do givePlayerMoney ( player, 100 ) end end ,300000, 0 )
  6. You must have more than one resource that is used to chat.
  7. Lo que acabas de decir no tiene sentido, una funcion se puede exportar client o server side.
  8. Castillo

    Help

    It's just a variable, it depends on what is that variable used for about what it does when it's set to true.
  9. takePlayerMoney(theplayer, 5000(amount)) What is (amount) doing there? Where is 'theplayer' defined? it should be 'source'.
  10. No, that doesn't make much sense.
  11. Click on both links and read about them.
  12. pList = guiCreateGridList(194,9,300,300,false,wn) column = guiGridListAddColumn( pList, "Player", 0.85 ) function refresh ( ) for id, player in ipairs ( getElementsByType ( "player" ) ) do guiGridListSetItemText ( pList, guiGridListAddRow ( pList ), column, getPlayerName ( player ), false, false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, refresh ) function update ( old, new ) if ( eventName == "onClientPlayerJoin" ) then guiGridListSetItemText ( pList, guiGridListAddRow ( pList ), column, getPlayerName ( source ), false, false ) elseif ( eventName == "onClientPlayerQuit" ) then for row = 0, guiGridListGetRowCount ( pList ) do if ( guiGridListGetItemText ( pList, row, column ) == getPlayerName ( source ) ) then guiGridListRemoveRow ( pList, row ) break end end elseif ( eventName == "onClientPlayerChangeNick" ) then for row = 0, guiGridListGetRowCount ( pList ) do if ( guiGridListGetItemText ( pList, row, column ) == old ) then guiGridListSetItemText ( pList, row, column, new, false, false ) break end end end end addEventHandler ( "onClientPlayerJoin", root, update ) addEventHandler ( "onClientPlayerQuit", root, update ) addEventHandler ( "onClientPlayerChangeNick", root, update )
  13. addEventHandler ( "onPlayerLogin", root, function ( ) executeCommandHandler ( "skin", source ) end ) Tendras que darle permisos en el ACL para poder usar la funcion: executeCommandHandler.
  14. pList = guiCreateGridList(194,9,300,300,false,wn) column = guiGridListAddColumn( pList, "Player", 0.85 ) function refresh ( ) guiGridListClear ( pList ) for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( pList ) guiGridListSetItemText ( pList, row, column, getPlayerName ( player ), false, false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, refresh ) addEventHandler ( "onClientPlayerJoin", root, refresh ) addEventHandler ( "onClientPlayerQuit", root, refresh ) addEventHandler ( "onClientPlayerChangeNick", root, refresh ) That'll update it every time a player joins/quits/changes nick.
  15. No, I tell you to read about this: https://wiki.multitheftauto.com/wiki/OnClientGUIClick
  16. Se active o se ejecute como si pusiera "/skin"?
  17. Se active o se ejecute como si pusiera "/skin"?
  18. How about... no? click on the link I gave you and read about it.
  19. Read only: guiMemoSetReadOnly Close button: onClientGUIClick
  20. His code works as it's supposed, the only problem is in here: outputChatBox ( 'You'll die in 5 seconds!', p, 255, 255, 255, false ) With the ' he's finishing the string. Should be: outputChatBox ( "You'll die in 5 seconds!", p, 255, 255, 255, false )
  21. Just add: guiSetVisible ( GUIEditor_Window[1], false ) After: guiCreateWindow.
  22. There is no need for that, just copy the script I posted and your server side.
  23. That error was on your script, but in mine isn't.
×
×
  • Create New...