Reflex# Posted March 18, 2012 Share Posted March 18, 2012 local root = getRootElement() addEventHandler("onPlayerLogin", root, function() outputChatBox(getPlayerName(source).." has logged in!", root) end ) local root = getRootElement() addEventHandler("onPlayerLogout", root, function() outputChatBox(getPlayerName(source).." has logged out!", root) end ) Script dont work..wtf? Link to comment
Kenix Posted March 18, 2012 Share Posted March 18, 2012 (edited) Show meta.xml. Also why you define 2 times variable root? root is predefined variable viewtopic.php?f=91&t=39678 Edited March 18, 2012 by Guest Link to comment
Reflex# Posted March 18, 2012 Author Share Posted March 18, 2012 Show meta.xml. --> meta.xml "ReFleX" type">type="script" name="Logged" version="1.0.3" /> Link to comment
Kenix Posted March 18, 2012 Share Posted March 18, 2012 (edited) <meta> <info author="ReFleX" type="script" name="Logged" version="1.0.3" /> <script src="Logged.lua" /> </meta> Because onPlayerLogin and onPlayerLogout is server side events. Edited March 18, 2012 by Guest Link to comment
X-SHADOW Posted March 18, 2012 Share Posted March 18, 2012 lol its must be type="server" becuse you are using onPlayerLogin and Quit not on ClientPlayerLogin and Quit Link to comment
Reflex# Posted March 18, 2012 Author Share Posted March 18, 2012 <meta> <info author="ReFleX" type="script" name="Logged" version="1.0.3" /> <script src="Logged.lua" /> </meta> Because onPlayerLogin and onPlayerLogout is server side events. oh sorry i forget, my bad Link to comment
Reflex# Posted March 18, 2012 Author Share Posted March 18, 2012 local root = getRootElement() addEventHandler("onPlayerLogin", root, function() outputChatBox(getPlayerName(source).." has logged in!", root) end ) local root = getRootElement() addEventHandler("onPlayerLogout", root, function() outputChatBox(getPlayerName(source).." has logged out!", root) end ) Script dont work..wtf? All work..but i have color code in nickname and when i login..write [RHD]R#555555eFleX has logged in! How to fix this? Link to comment
Gr0x Posted March 18, 2012 Share Posted March 18, 2012 Color code example: outputChatBox(getPlayerName(source).." has logged in!", root,255,255,255,true) Link to comment
Reflex# Posted March 18, 2012 Author Share Posted March 18, 2012 Color code example: outputChatBox(getPlayerName(source).." has logged in!", root,255,255,255,true) No no i'm not about color code of this words.about color code in my nick..[RHD]R#555555eFleX this is showing when i login in and out.but how fix this? Link to comment
Kenix Posted March 18, 2012 Share Posted March 18, 2012 addEventHandler( "onPlayerLogin", root, function( ) outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!" ) end ) addEventHandler( "onPlayerLogout", root, function( ) outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!" ) end ) Link to comment
Reflex# Posted March 18, 2012 Author Share Posted March 18, 2012 addEventHandler( "onPlayerLogin", root, function( ) outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!" ) end ) addEventHandler( "onPlayerLogout", root, function( ) outputChatBox( getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!" ) end ) Thx all work..but when i add in outputChatBox " #0075EB [RHD]" this dont work..i show all script: addEventHandler( "onPlayerLogin", root, function( ) outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!", 255,255,255,) end ) addEventHandler( "onPlayerLogout", root, function( ) outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!", 255,255,255) end ) Link to comment
MIKI785 Posted March 18, 2012 Share Posted March 18, 2012 Try: addEventHandler( "onPlayerLogin", root, function( ) outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged in!", 255,255,255, true) end ) addEventHandler( "onPlayerLogout", root, function( ) outputChatBox( " #0075EB [RHD]" getPlayerName( source ):gsub( '#%x%x%x%x%x%x', '' ) .." has logged out!", 255,255,255, true) end ) Link to comment
Kenix Posted March 18, 2012 Share Posted March 18, 2012 [RHD]ReFleX, Read viewtopic.php?f=148&t=40809 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