iPrestege Posted May 10, 2013 Posted May 10, 2013 Change the 0 at line '32' to 1 -.- and hmm...The text make it like that : addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end ) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end
Lucario Posted May 10, 2013 Author Posted May 10, 2013 When i connect to the server, in the dx text say nil, i alredy changed to 1
Lucario Posted May 10, 2013 Author Posted May 10, 2013 Here is my edit of the client side of the greenzones, it is right? for me dont work the text when liave and entry there function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) end function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) end
iPrestege Posted May 10, 2013 Posted May 10, 2013 1- debugscript 3 2- The tocolor function is wrong read the wiki.
Lucario Posted May 10, 2013 Author Posted May 10, 2013 Solved the Greenzone, but the message is permanent, where i can put the setTimer, i put: setTimer (DxHandlerFunction, 4000, 0) but it dont work, full client: function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) setTimer (DxHandlerFunction, 4000, 0) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) end) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) setTimer (DxHandlerFunction2, 4000, 0) end In the debugscript dont appear why when a player join the server, the primmary message is: Nil
iPrestege Posted May 10, 2013 Posted May 10, 2013 Solved the Greenzone, but the message is permanent, where i can put the setTimer, i put: setTimer (DxHandlerFunction, 4000, 0) but it dont work, full client: function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) setTimer (DxHandlerFunction, 4000, 0) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) end) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) setTimer (DxHandlerFunction2, 4000, 0) end In the debugscript dont appear why when a player join the server, the primmary message is: Nil No don't put the timer for the function put it for the event .
Lucario Posted May 10, 2013 Author Posted May 10, 2013 function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) setTimer (onClientRender, 4000, 0) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) setTimer (onClientRender, 4000, 0) end) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) end
iPrestege Posted May 10, 2013 Posted May 10, 2013 This make no sense at all try this : function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() setTimer( function () addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) end,4000,1 ) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) setTimer( function () addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) end,4000,1 ) end ) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) end
Lucario Posted May 10, 2013 Author Posted May 10, 2013 Its appear in 4 seconds, i want the message automaticly leave when passed 4 seconds, or leave the greenzone, better if a player enter output the message, but when a player leave quit the message and output the other message for 4 seconds then quit
iPrestege Posted May 10, 2013 Posted May 10, 2013 You mean like that ? function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) removeEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) removeEventHandler("onClientRender",getRootElement(),DxHandlerFunction) end) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) end
Lucario Posted May 10, 2013 Author Posted May 10, 2013 mmm yes, but when a player enter, only output the red message, when the player leave the zone, quit the red message, and output the green, and the green message will disapear in 4 seconds
iPrestege Posted May 10, 2013 Posted May 10, 2013 function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) removeEventHandler("onClientRender",getRootElement(),DxHandlerFunction) setTimer(function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) end,4000,1) end) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) end Try it.
Lucario Posted May 10, 2013 Author Posted May 10, 2013 Little bug, when leave, the timer work, but after 4 seconds the message appear, i need after 4 seconds the message leave
iPrestege Posted May 10, 2013 Posted May 10, 2013 function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) setTimer(function() removeEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) end,4000,1) setTimer(function() removeEventHandler("onClientRender",getRootElement(),DxHandlerFunction) end,4000,1) end) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) end
Lucario Posted May 10, 2013 Author Posted May 10, 2013 Now the problem is, appear 2 messages when a player entry to the col, the green and red, but when leave, the 2 messages disapear
iPrestege Posted May 10, 2013 Posted May 10, 2013 Now the problem is, appear 2 messages when a player entry to the col, the green and red, but when leave, the 2 messages disapear And what you need? Explain more please -.- .
Lucario Posted May 10, 2013 Author Posted May 10, 2013 I need, when a player enter to the green area, there appear red message down in spanish lenguage, when the player leave, the red message desapear, and appear a green message with duration 4 seconds then disapear, with dxdrawntext i set the cordinate of the text
Lucario Posted May 10, 2013 Author Posted May 10, 2013 Solved thank you very mutch, the code for the people who need the resource for help: function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() addEventHandler("onClientRender",getRootElement(),DxHandlerFunction) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end) function DxHandlerFunction( ) dxDrawText("Has Entrado a la Zona de No Campeo, Tienes 1 Minuto Para Salir", 271, 709, 942, 775, 0xFFFF0000, 1.30, "pricedown", "center", "top", false, false, true, false, false) end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) addEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) setTimer(function() removeEventHandler("onClientRender",getRootElement(),DxHandlerFunction2) end,4000,1) removeEventHandler("onClientRender",getRootElement(),DxHandlerFunction) end) function DxHandlerFunction2( ) dxDrawText("Has Salido de la Zona de No Campeo, Ahora Puedes Usar Armas", 271, 709, 942, 775, 0xFF00FF00, 1.30, "pricedown", "center", "top", false, false, true, false, false) end
iPrestege Posted May 11, 2013 Posted May 11, 2013 You're welcome sorry i was busy But am very happy you know why ? Because you do it .
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now