Platin Posted May 14, 2015 Posted May 14, 2015 Buenas, desde ayer tengo el siguiente problema para detectar un elemento después de triggear. El orden es así: 1 2 3 onMarketHit > clientside > serverside En el 3º paso, hay varias cosas, entre ellas, una que teletransporta la jugador y demás, funciona todo correcto, hasta que llega al setTimer (todo lo de teletransportar, cambiar de dimension, etc, esta con source, ya que el source de la funcion triggeada es el localPlayer del cliente) setTimer(function() ocupado = false setElementAlpha(source, 255) setElementFrozen(source, false) setElementPosition(source, 1205, 8, 1001) setElementRotation(source, 0, 0, 180) setElementDimension(source, 0) destroyElement(pj) destroyElement(stripper) showChat(source, true) setPlayerHudComponentVisible ( source, "all", true ) setPlayerHudComponentVisible ( source, "ammo", false ) setPlayerHudComponentVisible ( source, "armour", false ) setPlayerHudComponentVisible ( source, "clock", false ) setPlayerHudComponentVisible ( source, "health", false ) setPlayerHudComponentVisible ( source, "money", false ) setPlayerHudComponentVisible ( source, "weapon", false ) setPlayerHudComponentVisible ( source, "wanted", false ) setPlayerHudComponentVisible ( source, "breath", false ) end, 15000, 1, source) El tema es que ahí source no sirve, ni thePlayer, ni nada, creo que ni sabe que elemento es. ¿Qué estoy haciendo mal? Gracias de antemano. https://www.proyectomila.net @platin
Tomas Posted May 14, 2015 Posted May 14, 2015 El problema es que setTimer ya tiene su source asignado, debes hacer una variable que contenga al source fuera del timer y luego usarla en vez del source. Currently developing for International Gaming Community - Join us!
Platin Posted May 15, 2015 Author Posted May 15, 2015 El problema es que setTimer ya tiene su source asignado, debes hacer una variable que contenga al source fuera del timer y luego usarla en vez del source. Algo como: plr = source Si no, no te comprendí del todo. https://www.proyectomila.net @platin
MTA Team 0xCiBeR Posted May 15, 2015 MTA Team Posted May 15, 2015 source = source Esto antes del timer también serviría. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Tomas Posted May 15, 2015 Posted May 15, 2015 El problema es que setTimer ya tiene su source asignado, debes hacer una variable que contenga al source fuera del timer y luego usarla en vez del source. Algo como: plr = source Si no, no te comprendí del todo. Sí, y luego usas plr en vez de source adentro del timer Currently developing for International Gaming Community - Join us!
Platin Posted May 15, 2015 Author Posted May 15, 2015 El problema es que setTimer ya tiene su source asignado, debes hacer una variable que contenga al source fuera del timer y luego usarla en vez del source. Algo como: plr = source Si no, no te comprendí del todo. Sí, y luego usas plr en vez de source adentro del timer Gracias por tus respuesta rápidas como siempre Tomás. Luego te informo si me sirvió como debería EDIT: Me funciono, como siempre, solucionando mis problemas https://www.proyectomila.net @platin
Tomas Posted May 15, 2015 Posted May 15, 2015 Gracias por tus respuesta rápidas como siempre Tomás. Luego te informo si me sirvió como debería EDIT: Me funciono, como siempre, solucionando mis problemas Me alegro que te haya servido Currently developing for International Gaming Community - Join us!
Recommended Posts