Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Did you give permission in the acl.xml?
  2. Son del recurso 'runcode' y se usan para ejecutar codigos, osea como si fuese un archivo .lua, podes ejecutar lo que quieras.
  3. How are you saving the level?
  4. Do this instead: local won = math.random ( 1000, 3000 ) givePlayerMoney ( source, won )
  5. Castillo

    DM server.

    It should be located on "race/race_client.lua".
  6. That's because givePlayerMoney returns a boolean: if the money was successfully given, it returns true, false otherwise.
  7. You have a missing parentheses at this line: won = givePlayerMoney(source,math.random(1000,3000) Should be: won = givePlayerMoney ( source, math.random ( 1000, 3000 ) )
  8. Hay uno en la comunidad que bloquea los spawns con contraseñas.
  9. That's not a .DFF and .TXD, which is what he requested.
  10. -- server side: local gRoot = getRootElement(); local sounds = { } addEvent( "serverLoadMusicTable", true ); addEventHandler( "serverLoadMusicTable", gRoot, function () local res, mTable, xml = getThisResource(), {}, xmlLoadFile( "meta.xml", res ); local nameTable = {} if xml then local i = 0; while ( xmlFindChild( xml, "stream", i ) ) do local dir = xmlNodeGetAttribute( xmlFindChild( xml, "stream", i ), "url" ); local streamname = xmlNodeGetAttribute( xmlFindChild( xml, "stream", i ), "name" ); table.insert( mTable, dir..";"..streamname ); i = i + 1; end; end; triggerClientEvent( source, "clientReceiveMusicTable", gRoot, mTable ); end ) addEvent ( "createSound", true ) addEventHandler ( "createSound", root, function ( id, theVehicle ) if ( theVehicle ) then triggerClientEvent(root, "createSoundClient", root, id, theVehicle) sounds [ theVehicle ] = id -- Store in the table the music ID using theVehicle as table index. end end ) addEvent ( "destroySound", true ) addEventHandler ( "destroySound", root, function ( theVehicle ) if ( theVehicle ) then triggerClientEvent(root, "destroySoundClient", root, theVehicle) sounds [ theVehicle ] = nil -- Remove the entry from the table. end end ) Like that, now you have to trigger a event from the client side to request the content of 'sounds' table, then in the client side, loop that table and create the sounds.
  11. That's a server side script, so the type must be "server" not "client".
  12. You'll have to make some system to store in a table the vehicles that have music playing, and the URL, so when a new player joins, you trigger an event to request them.
  13. You mean that the music is no longer playing after you reconnect?
  14. Pusiste "onClientGuiClick" no "onClientGUIClick" en la linea: addEventHandler("onClientGuiClick", BotonComprar, Usar, false)
  15. Castillo

    Duda

    Si, exactamente. Podes usar getCameraMatrix para obtener la posicion.
  16. Castillo

    Duda

    setCameraMatrix se usa para cambiar de posicion la camara del jugador. getCameraTarget se usa para obtener el elemento al cual tu camara esta siguiendo.
  17. Castillo

    DX gui

    guieditor only works for the MTA GUI, dxgui doesn't have an editor.
  18. onResourceStart no tiene ningun argumento de jugador.
  19. No, I'm not going to tell you how to do it. Topic locked.
  20. They are compiled, we won't help you here on how to decompile them.
  21. Can you show me the registration part?
  22. That'll work, but it'll show it to everyone.
×
×
  • Create New...