Evil-Cod3r Posted February 29, 2012 Posted February 29, 2012 Hi all i made this but the font not work ! addEvent("Enter",true) addEventHandler("Enter",getRootElement(), function(name) if isElement(jon) and isElement(p_name) then restTimer(pn) restTimer(jn) guiSetText(p_name,tostring(name)) else jon = guiCreateLabel(14,197,38,14," Joined: ",false) p_name = guiCreateLabel(59, 198, 227, 17,tostring(name),false) pn = setTimer(destroyElement,22000,1,p_name) jn = setTimer(destroyElement,22000,1,jon) end end) function start () myFont = guiCreateFont( "font/20.ttf", 12 ) guiSetFont( jon, myFont ) else destroyElement( myFont ) myFont = nil end end end addEventHandler("onClientResourceStart",getRootElement(), start ) My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Castillo Posted February 29, 2012 Posted February 29, 2012 addEventHandler("onClientResourceStart",resourceRoot, function () myFont = guiCreateFont( "font/20.ttf", 12 ) end ) addEvent("Enter",true) addEventHandler("Enter",getRootElement(), function(name) if isElement(jon) and isElement(p_name) then restTimer(pn) restTimer(jn) guiSetText(p_name,tostring(name)) else jon = guiCreateLabel(14,197,38,14," Joined: ",false) guiSetFont( jon, myFont ) p_name = guiCreateLabel(59, 198, 227, 17,tostring(name),false) pn = setTimer(destroyElement,22000,1,p_name) jn = setTimer(destroyElement,22000,1,jon) end end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted February 29, 2012 Posted February 29, 2012 Again syntax error Evil-Cod3r,Learn lua! viewtopic.php?f=91&t=40809 And this: https://wiki.multitheftauto.com/wiki/Scr ... troduction viewtopic.php?f=91&t=40807 Please! http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Evil-Cod3r Posted February 29, 2012 Author Posted February 29, 2012 i dont think guiCreateFont work for mta 1.3 i fixed it another way thanks all My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Castillo Posted February 29, 2012 Posted February 29, 2012 Maybe the font is wrong? or too big? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Evil-Cod3r Posted February 29, 2012 Author Posted February 29, 2012 SoldSnake can i make some Anminon for the Text ?? like flashing for 8 sec and the destroy ? My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Kenix Posted February 29, 2012 Posted February 29, 2012 viewtopic.php?f=108&t=24262&hilit=textlib Download http://www.mediafire.com/?o3ndd7jtf8gqf54 http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Evil-Cod3r Posted February 29, 2012 Author Posted February 29, 2012 and how to use it Kenix ? but it in meta with my script ? My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Kenix Posted February 29, 2012 Posted February 29, 2012 (edited) So, you need add this files to meta.xml Simple script: local text,anim local function Remove ( ) text:color( 0, 0, 0, 0 ) text:destroy() text = nil anim:remove() anim = nil end addCommandHandler( 'simple', function( ) if text then Remove( ) end text = dxText:create( "Text", 650.0, 91.0, false, 'default', 2, 'center' ) text:align("center", "center") text:type( 'stroke' ) text:color( 255,0,0,255 ) anim = Animation.createAndPlay( text, Animation.presets.dxTextFadeOut( 5000 ), Remove ) end ) type /simple and this text shows only 5 sec and destroy. Edited February 29, 2012 by Guest http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Evil-Cod3r Posted February 29, 2012 Author Posted February 29, 2012 i think i start learn first becuse its hard thing My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
Kenix Posted February 29, 2012 Posted February 29, 2012 Good luck. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
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