Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. addEventHandler ( "onPlayerWasted", root, function ( ) setTimer ( function ( thePlayer ) if isElement ( thePlayer ) then local model = vehicles [ math.random ( #vehicles ) ] local vehicle = createVehicle ( model, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) ) spawnPlayer ( thePlayer, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) ) setCameraTarget ( thePlayer, thePlayer ) warpPedIntoVehicle ( thePlayer, vehicle ) end end ,5000, 1, source ) end )
  2. @aintaro: addCommandHandler client-side has no player argument, use 'localPlayer'.
  3. @#Twerky: Please don't post if you don't know what you are talking about. @John Smith: That doesn't make any sense.
  4. Well, obviously it'll give errors, you didn't specify the player argument to which you want to give it. local _, addexp = exports [ "Jack" ]:addPlayerExp ( p, exp )
  5. No te ofendas, pero la traduccion no es muy buena. Hablo de: https://wiki.multitheftauto.com/wiki/ES/CreateExplosion
  6. So, you are passing a string to dxDrawRectangle.
  7. How can outputChatBox return that? and if it does, then 'v' is a string.
  8. I believe that has been done by rotating the objects.
  9. You aren't using the exported function.
  10. Uh, that makes no sense. Problems: 1º removeEventHandler arguments are: attachedTo, function. And if you remove it, nobody else will be able to spawn when join. 2º bindKey server-side requires a player element, "player" is not defined there. Bind it when the player joins.
  11. Errores: 1º Tu funcion se llama igual que la que intentas ejecutar, y igual que una nativa del MTA, nunca hagas esto a menos que lo necesites. 2º outputChatBox cuando se usa client-side no tiene argumento de visibleTo. 3º Pusiste un parentesis de mas. 4º getRootElement ( ) hara que la funcion se ejecute al iniciar cualquier recurso, no solo el que tenga el codigo. function mensaje ( ) outputChatBox ( "Mensaje" ) end addEventHandler ( "onClientResourceStart", resourceRoot, mensaje )
  12. spawnPoints = { [ 1 ] = { 2702.2, -3018.6, 99.9 }, [ 2 ] = { 2696.7, -3015.9, 99.9 } } vehicles = {602,545,496,517,401,410,518,600,527,436,589,580,419,439,533,549,526,491,474,445,604,507,585,587,466,492,546,551,516,467,426,547,405,409,550,566,540,421,529,581,509,481,462,521,463,510,522,461,448,468,586,485,552,431,438,437,574,420,525,408,416,433,427,490,528,407,544,523,470,598,596,597,599,601,428,499,609,498,524,532,578,486,406,573,455,588,403,514,423,414,443,515,531,456,459,422,482,605,530,418,572,582,413,440,543,583,478,554,536,575,534,567,535,576,412,402,542,603,475,568,424,504,457,483,508,571,500,444,556,557,471,495,539,429,541,415,480,562,565,323,492,502,503,411,559,561,560,506,451,558,555,477,579,400,404,489,505,479,442,458} function spawnSumoPlayer ( ) local model = vehicles [ math.random ( #vehicles ) ] local vehicle = createVehicle ( model, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) ) if spawnPlayer ( source, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) ) then fadeCamera ( source, true ) setCameraTarget ( source, source ) warpPedIntoVehicle ( source, vehicle ) end end addEventHandler ( "onPlayerJoin", getRootElement(), spawnSumoPlayer )
  13. You are using race events, why do you even need to spawn the player? race does it all by itself.
  14. My bad, I forgot something, copy it again.
  15. function spawnSumoPlayer ( ) spawnPlayer ( source, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) ) fadeCamera ( source, true ) setCameraTarget ( source, source ) end addEventHandler ( "onPlayerJoin", getRootElement(), spawnSumoPlayer )
  16. addEventHandler("onPlayerSpawn",root,spawnSumoPlayer) That line is causing the stack overflow, once you spawn, it's spawning you again in a non stop loop. Simply remove it.
  17. No, the pack of resources it contains the server when you install MTA.
  18. Post the entire code, I think that you have a function also called "spawnPlayer".
  19. It's because they are being given after login.
  20. spawnPoints = { [ 1 ] = { 2702.2, -3018.6, 99.9 }, [ 2 ] = { 2696.7, -3015.9, 99.9 } } function spawnSumoPlayer ( ) spawnPlayer ( source, unpack ( spawnPoints [ math.random ( #spawnPoints ) ] ) ) end addEventHandler ( "onPlayerJoin", getRootElement(), spawnSumoPlayer )
  21. spawnPoints = { [1] = { 2702.2, -3018.6, 99.9 }, [2] = { 2696.7, -3015.9, 99.9 } }
  22. That code will spawn the player as many times as spawnpoints the table has.
×
×
  • Create New...