andrex123 Posted January 3, 2012 Share Posted January 3, 2012 local spawnX, spawnY, spawnZ = -205.10800170898, 1119.1826171875, 19.7421875 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) setElementModel (theplayer, 26) --Esto me esta fallando fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("---------------------------", source) outputChatBox("---------Server Rol Play---", source) outputChatBox("--Dueño: Andres_Escudero---", source) outputChatBox("---------------------------", source) outputChatBox ( "#FF0000Recuerda Registrarte usando /register [Contraseña]", getRootElement(), 255, 255, 255, true ) outputChatBox(" #00FF00Recuerda Loguearte usando /login [Contraseña]", getRootElement(), 255, 255, 255, true ) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) Aca yo quiero cuando el jugador entre el server les aparescan esas letras, y le ponga el skin 26 pero del skin 26 no funciona solo da las letras ------------------------------------- addEventHandler( "onPlayerWasted", getRootElement( ), function(player) setTimer( spawnPlayer, 4000, 1, source, -316.30599975586, 1055.4377441406, 19.7421875 ) outputChatBox(" #FF0000 Te has desmallado y te hemos traido al hospital de Ford Carson", getRootElement(), 255, 255, 255, true ) outputChatBox(" #FF0000 Y te hemos cobrado #00FF00$100#FF0000 Por la atencion Medica", getRootElement(), 255, 255, 255, true ) takePlayerMoney ( thePlayer, 100 ) ---Esto esta fallando end ) y aka que cuando el jugador muera lo lleben al hospital de ford carson, lo lleva pero no le quita dinero y ademas le muestra el mensaje a todo, y quiero que se lo de al jugador nomas Link to comment
-Gus- Posted January 3, 2012 Share Posted January 3, 2012 local spawnX, spawnY, spawnZ = -205.10800170898, 1119.1826171875, 19.7421875 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) setElementModel (theplayer, 26) --Esto me esta fallando --Nunca estas definiendo que es "theplayer", ahi deberias poner "source" que es el player que murio fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("---------------------------", source) outputChatBox("---------Server Rol Play---", source) outputChatBox("--Dueño: Andres_Escudero---", source) outputChatBox("---------------------------", source) outputChatBox ( "#FF0000Recuerda Registrarte usando /register [Contraseña]", getRootElement(), 255, 255, 255, true ) outputChatBox(" #00FF00Recuerda Loguearte usando /login [Contraseña]", getRootElement(), 255, 255, 255, true ) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) addEventHandler( "onPlayerWasted", getRootElement( ), function(player) setTimer( spawnPlayer, 4000, 1, source, -316.30599975586, 1055.4377441406, 19.7421875 ) outputChatBox(" #FF0000 Te has desmallado y te hemos traido al hospital de Ford Carson", getRootElement(), 255, 255, 255, true ) outputChatBox(" #FF0000 Y te hemos cobrado #00FF00$100#FF0000 Por la atencion Medica", getRootElement(), 255, 255, 255, true ) takePlayerMoney ( thePlayer, 100 ) ---Esto esta fallando --Lo mismo que antes... end ) Link to comment
andrex123 Posted January 3, 2012 Author Share Posted January 3, 2012 Gracias te lo agradezco entonces en vez de tus player es source? Link to comment
Castillo Posted January 3, 2012 Share Posted January 3, 2012 local spawnX, spawnY, spawnZ = -205.10800170898, 1119.1826171875, 19.7421875 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ, 0, 26) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("---------------------------", source) outputChatBox("---------Server Rol Play---", source) outputChatBox("--Dueño: Andres_Escudero---", source) outputChatBox("---------------------------", source) outputChatBox ( "#FF0000Recuerda Registrarte usando /register [Contraseña]", getRootElement(), 255, 255, 255, true ) outputChatBox(" #00FF00Recuerda Loguearte usando /login [Contraseña]", getRootElement(), 255, 255, 255, true ) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) addEventHandler( "onPlayerWasted", getRootElement( ), function() local skin = getElementModel(source) setTimer( spawnPlayer, 4000, 1, source, -316.30599975586, 1055.4377441406, 19.7421875, 0, skin ) outputChatBox(" #FF0000 Te has desmallado y te hemos traido al hospital de Ford Carson", source, 255, 255, 255, true ) outputChatBox(" #FF0000 Y te hemos cobrado #00FF00$100#FF0000 Por la atencion Medica", source, 255, 255, 255, true ) takePlayerMoney ( source, 100 ) end ) Link to comment
andrex123 Posted January 3, 2012 Author Share Posted January 3, 2012 Y que sigmifica el source Link to comment
Castillo Posted January 3, 2012 Share Posted January 3, 2012 Deberias usar la wiki, ahi te explica casi todo. https://wiki.multitheftauto.com/wiki/OnPlayerJoin Wiki quote:Source The source of this event is the player who joined. Link to comment
Recommended Posts