Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Ignore what LaCosta said. That spawn system has a file called "spawn_locations.map" inside the resource, to add a new class simply copy one of the current ones and change it to your likings.
  2. Castillo

    [Contador]

    Y si el script se reinicia, a la verga la tabla. Puedes usar SQL o funciones de archivo. Bueno, yo no dije que tipo de tabla tenia que usar. @MisterZ: Podrias usar SQL como dijo Tomas. executeSQLQuery o: dbConnect dbQuery dbExec
  3. This topic is to report to remove community resources, not from servers.
  4. ShowSuccess ( source ) Same for the ShowError function.
  5. 'source' is nil, because you didn't pass the argument when you executed the function at server.login function.
  6. Castillo

    [Contador]

    Tendrias que guardar cada serial de cada jugador en una tabla, y cada vez fijarte si esta en la tabla.
  7. "onClientResourceStart" is a client-side event, if you want to do it server side change it to "onResourceStart".
  8. Did you set the script as client side in the meta.xml? do you get any error in the debugscript?
  9. Well, that's obvious, isn't it? do you see any team-related function in that code?
  10. Oh, my bad, I didn't read that part, still, it would be good if he put it on the actual topic aswell.
  11. Yeah, I noticed that, but he's not even stating what is the problem with his code.
  12. You mean to show/hide it? you can define a variable with the interface state, and update it when you need to show it.
  13. Castillo

    [Contador]

    Te referis a jugador unicos que entraron al servidor? o a el record de jugadores que el servidor llego?
  14. No recuerdo que exista nada como eso. Para hacerlo podrias usar setWeaponProperty
  15. If I'm not wrong, only these who donated to MTA get access to the stats.
  16. Castillo

    VIP

    Pues, usas setElementData cuando le des VIP al jugador.
  17. You can use the same function, and combine it with the event onClientClick.
  18. You must compare the cursor position to the image draw position and size. You can use this function to avoid all the math calculations: function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end Example: addEventHandler ( "onClientRender", root, function ( ) local imgX, imgY, imgWidth, imgHeight = 50, 50, 200, 200 dxDrawImage ( imgX, imgY, imgWidth, imgHeight, ( isMouseInPosition ( imgX, imgY, imgWidth, imgHeight ) and "myImage2.png" or "myImage.png" ), tocolor ( 255, 255, 255 ) ) end )
  19. You forgot to end the function before addEventHandler.
  20. Yes, only use a single function to manage the respawning.
  21. What do you mean by "jobs"? do you mean more classes?
  22. You can either use tables, or use 'if' statements. Example: local x, y, z = 213.7412109375, 1868.505859375, 13.140625 -- Default position local team = getPlayerTeam ( source ) if ( team ) then local teamName = getTeamName ( team ) if ( teamName == "Military" ) then x, y, z = 213.7412109375, 1868.505859375, 13.140625 elseif ( teamName == "Survivors" ) then x, y, z = -2523.3408203125, -619.9560546875, 132.5625 end end setTimer ( spawnPlayer, 3000, 1, source, x, y, z, 0, getElementModel ( source ), 0, 0, team )
×
×
  • Create New...