Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    xml

    addEventHandler ( 'onGamemodeMapStart', root, function ( uMapStart ) local mapname = getResourceName( uMapStart ) local xml = xmlLoadFile("data/ratings.xml") if ( xml ) then local index = findIndexByName ( mapname ) if ( index ) then local map = xmlFindChild ( xml, "map", index ) local rating = xmlNodeGetAttribute ( map, "rating" ) local ratedBy = xmlNodeGetAttribute ( map, "ratedBy" ) local played = xmlNodeGetAttribute ( map, "played" ) outputChatBox ( "rated: ".. rating .." ratedBy: ".. ratedBy .." played ".. played, getRootElement(), 255, 0, 0, true ) else outputChatBox ( "Map not found in our ratings list.", getRootElement(), 255, 0, 0, true ) end else outputChatBox ( "Unable to load map ratings XML file.", getRootElement(), 255, 0, 0, true ) end end ) function findIndexByName ( mapName ) local ratingsFile = xmlLoadFile("data/ratings.xml") if ( ratingsFile ) then for index, map in ipairs ( xmlNodeGetChildren ( ratingsFile ) ) do local name = xmlNodeGetAttribute ( map, "id" ) if ( name == mapName ) then return index -1 end end xmlUnloadFile(ratingsFile) end end I tested it and it works.
  2. I was wondering the same Dakilla, how did it reach 1028 if the max players is 1024?
  3. Talvez the olvidaste de borrar el "end" tambien.
  4. Castillo

    Some help

    @Blazy: Use triggerServerEvent to give the money, because if you give it client side it won't sync it.
  5. Castillo

    script prob

    You may also want to disable the stealth kills with the Knife, you can cancel the event onClientPlayerStealthKill if the weapon is the Knife.
  6. Castillo

    play sound

    function soundPlay ( command ) -- Command handlers client side has no player argument. sound = playSound ( "files/mission.mp3", false ) setSoundVolume ( sound, 1.0 ) end addCommandHandler ( "sound", soundPlay ) -- change the command into whatever you want.
  7. Indeed, they mayn't support them, but you can always use guiCreateFont and then have that font.
  8. Para que ponerle 300? para eso borras o desactivas esa parte del script y listo. Esta en "s_main.lua", este es el codigo que tenes que borrar/desactivar: if ( ( plrTeam ) and ( plrTeam ~= class.team ) and ( countPlayersInTeam( plrTeam ) == 1 ) ) then destroyElement( plrTeam ); end
  9. May I ask what the hell is "onClientResourceRoot"? that event doesn't exists, nor makes any sense.
  10. Castillo

    play sound

    That's because every time you join, you download the client side resources and that triggers "onClientResourceStart".
  11. Esta mal, bindKey client side no tiene argumento de jugador, ademas en el evento de onClientMarkerHit/Leave pusiste: "player()", pero ahi deberia ir un elemento de un marker. function bindTheKeys ( ) bindKey ( "M", "down", cañon ) end addEventHandler ( "onClientMarkerHit", root, bindTheKeys ) function unbindTheKeys ( ) unbindKey ( "M", "down", cañon ) end addEventHandler ( "onClientMarkerLeave", root, unbindTheKeys ) No estoy seguro si te va a permitir usar "ñ".
  12. Castillo

    play sound

    function soundPlay ( ) sound = playSound ("files/mission.mp3", false ) setSoundVolume ( sound, 1.0 ) end addEventHandler ( "onClientResourceStart", resourceRoot, soundPlay )
  13. La verdad me estoy aburriendo de que postes un codigo y "que esta mal ?" sin decirnos si tenes errores o que deberia hacer el script.
  14. Oh, fue mi error, tendria que haber leido el resto del tema .
  15. El evento "onSpawnSlothBot" seguro se ejecuta cuando un bot spawnea, entonces vos estas creando los bots cuando otro bot spawnea. P.D: Para usar un evento creado por el script tambien tenes que usar addEvent.
  16. Estan spawneando los zombies cuando ellos spawnean? no tienen mucho sentido eso para mi.
  17. Estan en: "\server\mods\deathmatch\interval.db" Podes abrir el archivo con el programa: SQLitebrowser.
  18. You shouldn't say someone else code is wrong when you haven't even tested it.
  19. Castillo

    Looking 4

    He's talking about private spawns, e.g: I spawn on Los Santos, you spawn on Las Venturas, and so on, different spawn points for each player.
  20. It's not wrong, but yours is wrong. I clicked on "Rules" button and it didn't load the text from the XML file.
  21. -- script: local Rules = xmlLoadFile ( "xml/rules.xml" ) local Ruless = xmlNodeGetValue ( Rules ) window = guiCreateWindow(462,275,716,474,"",false) Rules = guiCreateButton(13,76,82,35,"Rules",false,window) memo = guiCreateMemo(117,29,582,386,"",false,window) function buttonClick ( button ) if ( button ~= "left" ) then return end if ( source == Rules ) then guiSetText ( memo, tostring ( Ruless ) ) end end addEventHandler ( "onClientGUIClick", resourceRoot, buttonClick ) -- rules.xml My rules here
  22. Castillo

    XAMMP

    Lo unico que tenes que hacer es iniciar XAMPP y luego iniciar "MySQL" y "Apache", luego vas tu navegador y pones "localhost" y clickeas en "phpMyAdmin", ahi creas tus bases de datos y luego usas los datos para conectarte en MTA.
×
×
  • Create New...