Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Accounts are stored at: "server\mods\deathmatch\internal.db".
  2. addEventHandler ( "onResourceStart", resourceRoot, function ( ) outputDebugString( "add Total Kills to scoreboard Return: "..tostring( call( getResourceFromName("Bio_Scoreboard"), "addScoreboardColumn", "Kills",root,2, 0.06 ) ) ) outputDebugString( "add Total Deaths to scoreboard Return: "..tostring( call( getResourceFromName("Bio_Scoreboard"), "addScoreboardColumn", "Deaths",root,3, 0.06 ) ) ) end ) addEventHandler ( "onPlayerLogin",root, function( _, account ) if ( not getAccountData ( account, "totalkillsdeaths.Kills" ) and not getAccountData ( account, "totalkillsdeaths.Deaths" ) ) then setAccountData ( account, "totalkillsdeaths.Kills", 0 ) setAccountData ( account, "totalkillsdeaths.Deaths", 0 ) end setElementData ( source,"Deaths",tonumber ( getAccountData ( account,"totalkillsdeaths.Deaths" ) or 0 ) ) setElementData ( source,"Kills",tonumber ( getAccountData ( account,"totalkillsdeaths.Kills" ) or 0 ) ) end ) addEventHandler ( "onPlayerWasted", root, function( totalAmmo, killer, killerWeapon, bodypart, stealth ) if ( killer and killer ~= source ) then local account = getPlayerAccount ( killer ) setAccountData ( account, "totalkillsdeaths.Kills", tonumber ( getAccountData ( account,"totalkillsdeaths.Kills" ) ) or 0 + 1 ) setElementData ( killer, "Kills", tonumber ( getAccountData( account,"totalkillsdeaths.Kills" ) ) ) end local accountSource = getPlayerAccount ( source ) setAccountData ( accountSource,"totalkillsdeaths.Deaths", tonumber ( getAccountData ( accountSource, "totalkillsdeaths.Deaths") ) or 0 + 1 ) setElementData ( source, "Deaths", tonumber ( getAccountData( accountSource, "totalkillsdeaths.Deaths" ) ) ) end ) Seems to work.
  3. No podes hacer eso.
  4. Ese tema se llama "Lighter Black", lo podes cambiar en "Settings -> Interface", no lo creo JR10, sino Aiboforcen.
  5. Castillo

    [Pregunta]

    Podes cargar varios sprites ( osea varias imagenes ) con un timer, si.
  6. La verdad es que no estoy seguro, talvez con shaders puedas hacerlo, pero yo no tengo experiencia en esto. Aca tenes unos cuantos ejemplos de shaders: https://wiki.multitheftauto.com/wiki/Shader_examples
  7. Castillo

    XML help

    I'm not sure what are you trying to achieve, but you have a problem there, you can add multiple ranks with the same name. function createRank ( INT, Label ) local Ranks = xmlLoadFile ( "Ranks.xml" ) if ( Ranks ) then if ( INT ) and ( Label ) then local GR = xmlFindChild ( Ranks, "gameranks", 0 ) if ( xmlFindChild ( GR, INT, 0 ) ) then outputDebugString ( "That rank has been created already." ) else xmlNodeSetValue ( xmlCreateChild ( GR , INT ), Label ) xmlSaveFile ( Ranks ) end else outputDebugString ( "In function createRank() incorrect arguments." ) end else outputDebugString ( "In function createRank() invalid XML file." ) end end I've fixed that small error, also you had another problem. You had "outputDebugSting" instead of "outputDebugString". This is the XML file I have: Colonel Hello World
  8. Castillo

    Looking 4

    -- Create a table with names and coordinates. local spawnPoints = { [ "Solidsnake14" ] = { 0, 0, 5 }, [ "Castillo" ] = { 0, 0, 10 }, [ "S3M" ] = { 0, 0, 15 } } function spawn ( thePlayer ) local playerName = getPlayerName ( thePlayer ):gsub ( "#%x%x%x%x%x%x", "" ) -- Get the player name and remove his HEX colors. if ( spawnPoints [ playerName ] ) then -- If the player has a spawn point .. spawnPlayer ( thePlayer, unpack ( spawnPoints [ playerName ] ) ) -- Unpack the coordinates of his spawn point and spawn him. end end addEventHandler ( "onPlayerJoin", root, function ( ) spawn ( source ) end ) addEventHandler ( "onPlayerWasted", root, function ( ) spawn ( source ) end )
  9. Castillo

    xml

    Topic locked.
  10. Castillo

    Need Help

    local marker = createMarker ( x, y, x, "cylinder", 2, 0, 0, 0 ) addEventHandler ( "onClientMarkerHit", marker, function ( hitElement ) if ( hitElement == localPlayer and getElementModel ( hitElement ) == 0 ) then guiSetVisible ( theWindow, not guiGetVisible ( theWindow ) ) end end )
  11. Castillo

    md5 + Trigger

    I'm guessing "encrypt" is a table, right? maybe you're messing Lua with another coding language.
  12. @DrakeN: Stop acting like a kid, we're here to help, not to insult someone because he doesn't know how to script. Topic locked.
  13. Usa la funcion: setVehicleColor para cambiarle el color a un vehiculo.
  14. No se si sabes, pero ya existe un game mode de "race", viene con el MTA cuando lo descargas.
  15. Aca no damos los scripts hechos, vos tenes que crearlo, nosotros te ayudamos cuando tengas problemas.
  16. Castillo

    Need Help

    What? I couldn't get much of what you said.
  17. Para hacer esto vas a tener que crear un sistema que registre cuantas veces se registro un jugador, te recomiendo MySQL o SQLite como base de datos. Pero sin experiencia en Lua y MySQL/SQLite no vas a ir muy lejos.
  18. Si, yo arregle esos errores ( si mal no recuerdo ), porque tenia CJ's por todo el servidor .
  19. No lo creo, que yo sepa solo crea la cuerda, el resto lo creas vos, existe un recurso llamado "abseil" que sirve para saltar de helicopeteros, pero que yo sepa no usa esa funcion.
  20. No, no depende de donde apuntes, el script obtiene la posicion del jugador, no de la camara.
  21. You didn't read my comments? getRandomLocation ( ) will return X, Y, Z, coordinates for your marker and to get the zone name use getZoneName.
  22. -- Create a table with coordinates. local locations = { { 0, 0, 5 }, { 0, 0, 10 }, { 0, 0, 15 }, { 0, 0, 20 } } function getRandomLocation ( ) return unpack ( locations [ math.random ( #locations ) ] ) -- Unpack the random location, that'll give us 3 arguments: x, y, z. end
×
×
  • Create New...