Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Topic moved to "Scripting" section. To replace skins you can use the resource "modloader" by Remi-X, easy to use. Link: https://community.multitheftauto.com/ind ... ls&id=3016
  2. That's because there's no such function: getPlayerScore setPlayerScore
  3. Castillo

    nametags gui

    Yes, there's a ingame GUI designer: https://community.multitheftauto.com/ind ... ils&id=141
  4. Me equivoque en algo, copia el codigo de nuevo.
  5. Topic moved to "Scripting" section.
  6. function getDefinitions ( startedMap ) local mapRoot = getResourceRootElement ( startedMap ) local spawnred = getElementsByType ( "spawnred", mapRoot ) local spawnblue = getElementsByType ( "spawnblue", mapRoot ) for teamr, rojos in pairs ( getPlayersInTeam ( Rojos ) ) do local randomPoint = math.random ( #getElementsByType ( "spawnred", mapRoot ) ) local x, y, z = unpack ( getElementData ( getElementsByType ( "spawnred", mapRoot ) [ randomPoint ], "position" ) ) local rot = getElementData ( getElementsByType ( "spawnred", mapRoot ) [ randomPoint ], "rotation" ) spawnPlayer ( rojos, x, y, z, rot, 170 ) end for teamb, azules in pairs ( getPlayersInTeam ( Blue ) ) do local randomPoint = math.random ( #getElementsByType ( "spawnblue", mapRoot ) ) local x, y, z = unpack ( getElementData ( getElementsByType ( "spawnblue", mapRoot ) [ randomPoint ], "position" ) ) local rot = getElementData ( getElementsByType ( "spawnblue", mapRoot ) [ randomPoint ], "rotation" ) spawnPlayer ( azules, x, y, z, rot, 188 ) end end addEventHandler ( "onGamemodeMapStart", getRootElement(), getDefinitions ) Suponiendo que "position" sea una tabla con 3 argumentos, deberia funcionar creo yo.
  7. Castillo

    How to

    The resource I gave you the link of has the meta as you say, you just do what I said.
  8. Because of the "getPropagated" argument @ addEventHandler, you must set it to false, like this: addEventHandler("onClientGUIClick", offRoadB , offRoadF, false)
  9. The problem is that you are adding the event before the function is created.
  10. Castillo

    Install server

    Read this manual: https://wiki.multitheftauto.com/wiki/Ser ... our_server
  11. Para eso que use onClientKey.
  12. Castillo

    Weapons

    What do you mean? when he dies he won't have any weapon, and all the saved ones are reseted.
  13. Castillo

    How to

    Use the "modloader" resource by Remi-X. Link: https://community.multitheftauto.com/ind ... ls&id=3016 It's pretty easy to use it, go to the modloader resource folder and place your infernus.dff and infernus.txd INSIDE "vehicles" folder, then on the meta.xml add this: "vehicles/infernus.dff" type="client" /> "vehicles/infernus.txd" type="client" />
  14. Castillo

    Weapons

    You posted a script earlier, just copy my code and paste it down of that script.
  15. Castillo

    nametags gui

    You'll need a combination of GUI and DX functions, GUI to create the interface to select nametag, and DX to draw the nametag itself. https://wiki.multitheftauto.com/wiki/Cli ... _functions dxDrawImage dxDrawText
  16. Castillo

    Install server

    For these game modes you'll need a MySQL server as well, I use "xampp" to use my MySQL scripts locally.
  17. There are several in the MTA community. https://community.multitheftauto.com/ind ... ls&id=4013 https://community.multitheftauto.com/ind ... ils&id=734
  18. Castillo

    Weapons

    Did I said replace something? no, I said add it on your save system script.
  19. function onClick ( button, state, clickedElement ) if ( button == "left" ) and ( state == "up" ) then if ( clickedElement ) and ( getElementType ( clickedElement ) == "vehicle" ) then local driver = getVehicleController ( clickedElement ) if ( driver ) then outputChatBox ( getPlayerName ( driver ) ) destroyElement ( clickedElement ) end end end end end addEventHandler ( "onPlayerClick", root, onClick )
  20. There's nothing to get the player name, I don't really understand what are you trying to do.
  21. Well, I used that same code and it printed it like it does on chatbox, I didn't use notepad to open it though.
×
×
  • Create New...