Lucario Posted May 10, 2013 Share Posted May 10, 2013 Hi all, i have a problem with the no camping zones when i put killPed, i use setTimer to let the people leave the area, but when i test i go to the no camping area, and then leave, the time end, and i die, i think the problem is with killPed, because i die when i leave or when i stay on the green area, always when the time end, here is the server side. timers = { } addEventHandler ("onResourceStart",getResourceRootElement(getThisResource()), function() local allGreenzones = getElementsByType ("radararea") for i,v in ipairs (allGreenzones) do local r,g,b,a = getRadarAreaColor (v) if (r == 0) and (g == 255) and (b == 0) and (a == 127) then local x,y = getElementPosition (v) local sx,sy = getRadarAreaSize (v) local col = createColCuboid (x,y, -50, sx,sy, 7500) setElementID (col, "greenzoneColshape") end end end) addEventHandler ("onColShapeHit", getRootElement(), function(hitElement, matchingDimension) if (isElement(hitElement)) and (getElementType (hitElement) == "player") and (getElementID (source) == "greenzoneColshape") then toggleControl (hitElement, "fire", false) toggleControl (hitElement, "next_weapon", false) toggleControl (hitElement, "previous_weapon", false) toggleControl (hitElement, "aim_weapon", false) toggleControl (hitElement, "vehicle_fire", false) showPlayerHudComponent (hitElement, "ammo", false) showPlayerHudComponent (hitElement, "weapon", false) triggerClientEvent (hitElement, "enableGodMode", hitElement) outputDebugString (getPlayerName(hitElement) .. " has entered the greenzone") timers[hitElement] = setTimer(killPed,5000,1, hitElement) end end) addEventHandler ("onColShapeLeave", getRootElement(), function(leaveElement, matchingDimension) if (getElementType (leaveElement) == "player") and (getElementID (source) == "greenzoneColshape") then toggleControl (leaveElement, "fire", true) toggleControl (leaveElement, "next_weapon", true) toggleControl (leaveElement, "previous_weapon", true) toggleControl (leaveElement, "aim_weapon", true) toggleControl (leaveElement, "vehicle_fire", true) showPlayerHudComponent (leaveElement, "ammo", true) showPlayerHudComponent (leaveElement, "weapon", true) triggerClientEvent (leaveElement, "disableGodMode", leaveElement) outputDebugString (getPlayerName(leaveElement) .. " has left the greenzone") if isTimer(timers[hitElement]) then killTimer(timers[hitElement]) end end end) Link to comment
Castillo Posted May 10, 2013 Share Posted May 10, 2013 I don't really understand the problem, but I can't seem to understand why do you want to kill the player after 5 seconds when they enter on a green zone? Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 If a player enter to a greenzone, he can stay there only 1 minute, if he stay there 1 min, he will be auto slaped, like a no camping zone, if he live the zone, he doesnt be killed Link to comment
Castillo Posted May 10, 2013 Share Posted May 10, 2013 And what is the current problem? Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 When i enter to the greenzone, and leave, the killtimer dont work, because when i leave i die at any rate, or killPed or killTimer dont work Link to comment
Castillo Posted May 10, 2013 Share Posted May 10, 2013 Found your problem, here: if isTimer(timers[hitElement]) then killTimer(timers[hitElement]) end You are using "hitElement", but your argument is "leaveElement". Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 And i have other problem with dxdrawtext (im leorning now), here is the script maked by me: function ServerNewsSend() text == dxDrawText( "Si Un Jura Mata a Otro Jura Sera Amonestado, y si Repite su Mala Conducta Sera Expulsado", 271, 10, 993, 68, 0xFFFF0000, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text1 == dxDrawText( "Visiten Nuestro Sitio Oficial: [url=http://www.mtajuraclan.blogspot.com]http://www.mtajuraclan.blogspot.com[/url]", 271, 10, 993, 68, 0xFF00FFFF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text2 == dxDrawText( "Para Ser Jura Debes Tener 30 Horas, 5 Niveles y Aplicar en [url=http://www.mtajuraclan.foroactivo.com]http://www.mtajuraclan.foroactivo.com[/url]", 271, 10, 993, 68, 0xFF00FFFF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text3 == dxDrawText( "Los Skins Son: Leon: 15, Wesker: 123, Goku: 107, Hitler: 222, Crysis: 28", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text4 == dxDrawText( "Los Carros Reales Son: Buffalo y Infernus", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text5 == dxDrawText( "Agreguen el Servidor a Favoritos para Encontrarlo Mejor \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text6 == dxDrawText( "Delen Like a Nuestro Sitio Oficial de Facebook \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text7 == dxDrawText( "El Server Funciona con un Host 24/7 Full", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text8 == dxDrawText( "Para Crearse un Clan Apreten F4, Para Unirse Apreten Invitaciones Despues de Ser Invitado", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text9 == dxDrawText( "Hay un Sistema de VIP, Para Serlo Pueden Ver los Precios en [url=http://www.mtajuraclan.blogspot.com]http://www.mtajuraclan.blogspot.com[/url]", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text10 == dxDrawText( "El Skin Restringido Solo para Juras/VIPS/Staff es Mafia, ID: 111", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text11 == dxDrawText( "El Skin Oficial del Staff es Cloud, ID: 25", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text12 == dxDrawText( "Visiten y Registrense en Nuestro Foro Oficial: [url=http://www.mtajuraclan.foroactivo.com]http://www.mtajuraclan.foroactivo.com[/url]", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text13 == dxDrawText( "Si Fuistes Baneado del Servidor o del Clan, Ve al Foro y Crea un Tema", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text14 == dxDrawText( "Si Quieren que Su Clan Sea Oficial, Deben Dirigirse al Foro y Enviar una Aplicacion", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text15 == dxDrawText( "Si Quieren que Su Clan Tenga un Subforo, Solo lo Tienen que Pedir en el Servidor", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text16 == dxDrawText( "Si Hay Algun Miembro del Staff o Jugador que Molesta, Pueden Enviar un Reporte", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else text17 == dxDrawText( "Cualquier Duda/Pregunta/Sugerencia/Etc en Especial, No Duden de Comunicarnoslo en el Foro", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) end end setTimer ( ServerNewsSend, 10000, 0 ) addEventHandler("onClientRender", root,text,text1,text2,text3,text4,text5,text6,text7,text8,text9,text10,text11,text12,text13,text14,text15,text16,text17, ServerNewsSend) it say end expected to close function at line 1 near else, i know need a end, but where? Edit: i will try leaveelement Link to comment
Castillo Posted May 10, 2013 Share Posted May 10, 2013 That's because your script doesn't make any sense, you can't use an "else" if you don't have an "if". Also, your event handler is wrong. Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 The problem persist, dont fixed, code: function ServerNewsSend() if dxDrawText( "Si Un Jura Mata a Otro Jura Sera Amonestado, y si Repite su Mala Conducta Sera Expulsado", 271, 10, 993, 68, 0xFFFF0000, 1.00, "pricedown", "center", "top", false, false, true, true, false) then dxDrawText( "Visiten Nuestro Sitio Oficial: [url=http://www.mtajuraclan.blogspot.com]http://www.mtajuraclan.blogspot.com[/url]", 271, 10, 993, 68, 0xFF00FFFF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Para Ser Jura Debes Tener 30 Horas, 5 Niveles y Aplicar en [url=http://www.mtajuraclan.foroactivo.com]http://www.mtajuraclan.foroactivo.com[/url]", 271, 10, 993, 68, 0xFF00FFFF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Los Skins Son: Leon: 15, Wesker: 123, Goku: 107, Hitler: 222, Crysis: 28", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Los Carros Reales Son: Buffalo y Infernus", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Agreguen el Servidor a Favoritos para Encontrarlo Mejor \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Delen Like a Nuestro Sitio Oficial de Facebook \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "El Server Funciona con un Host 24/7 Full", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Para Crearse un Clan Apreten F4, Para Unirse Apreten Invitaciones Despues de Ser Invitado", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Hay un Sistema de VIP, Para Serlo Pueden Ver los Precios en [url=http://www.mtajuraclan.blogspot.com]http://www.mtajuraclan.blogspot.com[/url]", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "El Skin Restringido Solo para Juras/VIPS/Staff es Mafia, ID: 111", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "El Skin Oficial del Staff es Cloud, ID: 25", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Visiten y Registrense en Nuestro Foro Oficial: [url=http://www.mtajuraclan.foroactivo.com]http://www.mtajuraclan.foroactivo.com[/url]", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Fuistes Baneado del Servidor o del Clan, Ve al Foro y Crea un Tema", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Quieren que Su Clan Sea Oficial, Deben Dirigirse al Foro y Enviar una Aplicacion", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Quieren que Su Clan Tenga un Subforo, Solo lo Tienen que Pedir en el Servidor", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Hay Algun Miembro del Staff o Jugador que Molesta, Pueden Enviar un Reporte", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Cualquier Duda/Pregunta/Sugerencia/Etc en Especial, No Duden de Comunicarnoslo en el Foro", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) end setTimer ( ServerNewsSend, 10000, 0 ) addEventHandler("onClientRender", root, ServerNewsSend) Now the AddEventHandler is fixed, but end expected Link to comment
Castillo Posted May 10, 2013 Share Posted May 10, 2013 You must to add another end to close the 'if' statement. Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 Alredy added the problem persist function ServerNewsSend() if dxDrawText( "Si Un Jura Mata a Otro Jura Sera Amonestado, y si Repite su Mala Conducta Sera Expulsado", 271, 10, 993, 68, 0xFFFF0000, 1.00, "pricedown", "center", "top", false, false, true, true, false) then dxDrawText( "Visiten Nuestro Sitio Oficial: [url=http://www.mtajuraclan.blogspot.com]www.mtajuraclan.blogspot.com[/url]", 271, 10, 993, 68, 0xFF00FFFF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Para Ser Jura Debes Tener 30 Horas, 5 Niveles y Aplicar en [url=http://www.mtajuraclan.foroactivo.com]www.mtajuraclan.foroactivo.com[/url]", 271, 10, 993, 68, 0xFF00FFFF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Los Skins Son: Leon: 15, Wesker: 123, Goku: 107, Hitler: 222, Crysis: 28", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Los Carros Reales Son: Buffalo y Infernus", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Agreguen el Servidor a Favoritos para Encontrarlo Mejor \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Delen Like a Nuestro Sitio Oficial de Facebook \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "El Server Funciona con un Host 24/7 Full", 271, 10, 993, 68, 0xFF0000FF, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Para Crearse un Clan Apreten F4, Para Unirse Apreten Invitaciones Despues de Ser Invitado", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Hay un Sistema de VIP, Para Serlo Pueden Ver los Precios en [url=http://www.mtajuraclan.blogspot.com]www.mtajuraclan.blogspot.com[/url]", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "El Skin Restringido Solo para Juras/VIPS/Staff es Mafia, ID: 111", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "El Skin Oficial del Staff es Cloud, ID: 25", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Visiten y Registrense en Nuestro Foro Oficial: [url=http://www.mtajuraclan.foroactivo.com]www.mtajuraclan.foroactivo.com[/url]", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Fuistes Baneado del Servidor o del Clan, Ve al Foro y Crea un Tema", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Quieren que Su Clan Sea Oficial, Deben Dirigirse al Foro y Enviar una Aplicacion", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Quieren que Su Clan Tenga un Subforo, Solo lo Tienen que Pedir en el Servidor", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Si Hay Algun Miembro del Staff o Jugador que Molesta, Pueden Enviar un Reporte", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) else dxDrawText( "Cualquier Duda/Pregunta/Sugerencia/Etc en Especial, No Duden de Comunicarnoslo en el Foro", 271, 10, 993, 68, 0xFF00FF00, 1.00, "pricedown", "center", "top", false, false, true, true, false) end setTimer ( ServerNewsSend, 10000, 0 ) addEventHandler("onClientRender", root, ServerNewsSend) end Link to comment
Castillo Posted May 10, 2013 Share Posted May 10, 2013 You did it wrong, you must add it after the other end, not after the event handler. Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 added and changed but still not work, end expected to close function at line 1 near else Link to comment
Castillo Posted May 10, 2013 Share Posted May 10, 2013 That whole script doesn't make any sense as I sai before. You are trying to show random messages every 10 seconds? Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 Yes im trying to show random dx messages on the screen up, like a outputchatbox, but with dxdrawtext And the final question, i have a problem with the client side where i have added a dxdrawtext of the first script, the no camping zone (greenzone), here is it: function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() if (source == getLocalPlayer()) then 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) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() if (source == getLocalPlayer()) then 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) removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end end) The message doesnt show when i entry to the zone, i want the message show for 3 seconds, then disapear, can you help me? thanks Link to comment
iPrestege Posted May 10, 2013 Share Posted May 10, 2013 As Solid , Said make no sense you have to create a table . Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 The table like that: table = {} But what i must put into {} ? Link to comment
iPrestege Posted May 10, 2013 Share Posted May 10, 2013 Hmmm..this is your script you have to add the messages to the list . local Msg = { "Los Skins Son: Leon: 15, Wesker: 123, Goku: 107, Hitler: 222, Crysis: 28", "Los Carros Reales Son: Buffalo y Infernus", "Next Msg" } local CreatedMsg = 0 addEventHandler("onClientRender",getRootElement(), function ( ) local Text = Msg[CreatedMsg+1] dxDrawText( tostring( Text ), 271, 10, 993, 68,tocolor(r,g,b,alpha),1.00, "pricedown","center", "top",false, false, true, true, false) end ) setTimer ( function ( ) if CreatedMsg == -- you're msg count -1 then CreatedMsg = 0 else CreatedMsg = CreatedMsg + 1 end end,1000,0 ) Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 it is client side or server side? in server side i give a error } expected to close { at line 1 and in client side it doesnt work Link to comment
iPrestege Posted May 10, 2013 Share Posted May 10, 2013 Post what you did and it's a client side script . Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 local Msg = { "Los Skins Son: Leon: 15, Wesker: 123, Goku: 107, Hitler: 222, Crysis: 28", "Los Carros Reales Son: Buffalo y Infernus", "Si Un Jura Mata a Otro Jura Sera Amonestado, y si Repite su Mala Conducta Sera Expulsado" "Visiten Nuestro Sitio Oficial: [url=http://www.mtajuraclan.blogspot.com]www.mtajuraclan.blogspot.com[/url]" "Para Ser Jura Debes Tener 30 Horas, 5 Niveles y Aplicar en [url=http://www.mtajuraclan.foroactivo.com]www.mtajuraclan.foroactivo.com[/url]" "Agreguen el Servidor a Favoritos para Encontrarlo Mejor \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />" "Delen Like a Nuestro Sitio Oficial de Facebook \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />" "El Server Funciona con un Host 24/7 Full" "Para Crearse un Clan Apreten F4, Para Unirse Apreten Invitaciones Despues de Ser Invitado" "Hay un Sistema de VIP, Para Serlo Pueden Ver los Precios en [url=http://www.mtajuraclan.blogspot.com]www.mtajuraclan.blogspot.com[/url]" "El Skin Restringido Solo para Juras/VIPS/Staff es Mafia, ID: 111" "El Skin Oficial del Staff es Cloud, ID: 25" "Visiten y Registrense en Nuestro Foro Oficial: [url=http://www.mtajuraclan.foroactivo.com]www.mtajuraclan.foroactivo.com[/url]" "Si Fuistes Baneado del Servidor o del Clan, Ve al Foro y Crea un Tema" "Si Quieren que Su Clan Sea Oficial, Deben Dirigirse al Foro y Enviar una Aplicacion" "Si Quieren que Su Clan Tenga un Subforo, Solo lo Tienen que Pedir en el Servidor" "Si Hay Algun Miembro del Staff o Jugador que Molesta, Pueden Enviar un Reporte" "Cualquier Duda/Pregunta/Sugerencia/Etc en Especial, No Duden de Comunicarnoslo en el Foro"} local CreatedMsg = 18 addEventHandler("onClientRender",getRootElement(), function ( ) local Text = Msg[CreatedMsg+1] dxDrawText( tostring( Text ), 271, 10, 993, 68,0xFF0000FF,1.00, "pricedown","center", "top",false, false, true, true, false) end ) setTimer ( function ( ) if CreatedMsg == 18 then CreatedMsg = 18 else CreatedMsg = CreatedMsg + 1 end end,1000,0 ) Link to comment
iPrestege Posted May 10, 2013 Share Posted May 10, 2013 There are some missing commas : local Msg = { "Los Skins Son: Leon: 15, Wesker: 123, Goku: 107, Hitler: 222, Crysis: 28", "Los Carros Reales Son: Buffalo y Infernus", "Si Un Jura Mata a Otro Jura Sera Amonestado, y si Repite su Mala Conducta Sera Expulsado", "Visiten Nuestro Sitio Oficial: [url=http://www.mtajuraclan.blogspot.com]http://www.mtajuraclan.blogspot.com[/url]", "Para Ser Jura Debes Tener 30 Horas, 5 Niveles y Aplicar en [url=http://www.mtajuraclan.foroactivo.com]http://www.mtajuraclan.foroactivo.com[/url]", "Agreguen el Servidor a Favoritos para Encontrarlo Mejor \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", "Delen Like a Nuestro Sitio Oficial de Facebook \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />", "El Server Funciona con un Host 24/7 Full", "Para Crearse un Clan Apreten F4, Para Unirse Apreten Invitaciones Despues de Ser Invitado", "Hay un Sistema de VIP, Para Serlo Pueden Ver los Precios en [url=http://www.mtajuraclan.blogspot.com]http://www.mtajuraclan.blogspot.com[/url]", "El Skin Restringido Solo para Juras/VIPS/Staff es Mafia, ID: 111", "El Skin Oficial del Staff es Cloud, ID: 25", "Visiten y Registrense en Nuestro Foro Oficial: [url=http://www.mtajuraclan.foroactivo.com]http://www.mtajuraclan.foroactivo.com[/url]", "Si Fuistes Baneado del Servidor o del Clan, Ve al Foro y Crea un Tema", "Si Quieren que Su Clan Sea Oficial, Deben Dirigirse al Foro y Enviar una Aplicacion", "Si Quieren que Su Clan Tenga un Subforo, Solo lo Tienen que Pedir en el Servidor", "Si Hay Algun Miembro del Staff o Jugador que Molesta, Pueden Enviar un Reporte", "Cualquier Duda/Pregunta/Sugerencia/Etc en Especial, No Duden de Comunicarnoslo en el Foro"} local CreatedMsg = 18 addEventHandler("onClientRender",getRootElement(), function ( ) local Text = Msg[CreatedMsg+1] dxDrawText( tostring( Text ), 271, 10, 993, 68,tocolor(r,g,b,alpha),1.00, "pricedown","center", "top",false, false, true, true, false) end ) setTimer ( function ( ) if CreatedMsg == 18 then CreatedMsg = 0 else CreatedMsg = CreatedMsg + 1 end end,1000,0 ) I Change this : 0xFF0000FF to tocolor(r,g,b,alpha) Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 Thx now work , but the colour is black, i think i can use colourfull codes hex? can you help me with the last script, with the camping zone (greenzone), here is the code: Client side: function godmodeHandler () cancelEvent () end addEvent ("enableGodMode",true) addEventHandler ("enableGodMode",getRootElement(), function() if (source == getLocalPlayer()) then 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) addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end end addEvent ("disableGodMode",true) addEventHandler ("disableGodMode",getRootElement(), function() if (source == getLocalPlayer()) then 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) removeEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) end end) The server side is working, but in the client side, when i entry to the zone, the dx text doesnt appear Link to comment
iPrestege Posted May 10, 2013 Share Posted May 10, 2013 1- Yes but keep the tocolor function and add the hex code on the first argument. 2- You are not using onClientRender to draw the text and the source is not defined. Link to comment
Lucario Posted May 10, 2013 Author Share Posted May 10, 2013 Where i must put this line?: addEventHandler ("onClientPlayerDamage",getRootElement(), godmodeHandler) how i can define the source? and why when the previous script you make say nil in the dxdrawtext, it say nil, and then say others messages Link to comment
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