CapY Posted October 2, 2011 Share Posted October 2, 2011 Well i have this code , but it seems it doesn't working. local root = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local player, accountName = "", "" function dxLogin() dxDrawText( getPlayerName(player).." has logged into "..tostring(accountName), 354, screenHeight-703, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 2, "pricedown" ) end function dxLogout() dxDrawText( getPlayerName(player).." have been logged out "..tostring(accountName), 354, screenHeight-703, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 2, "pricedown" ) end This is not the whole code. I have errors on line 6 and 10. attempt to concatenate upvalue 'accountName' (a nil value) Link to comment
karlis Posted October 2, 2011 Share Posted October 2, 2011 you need to use dx functions with the event onClientRender. seriously, you have like hundred of help topics, you should learn already. and account cant be an empty string. Link to comment
^Dev-PoinT^ Posted October 2, 2011 Share Posted October 2, 2011 Try This local root = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local player, accountName = "", "" function dxLogin() dxDrawText( getPlayerName(player).." has logged into "..tostring(accountName), 354, screenHeight-703, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 2, "pricedown" ) end function dxLogout() dxDrawText( getPlayerName(player).." have been logged out "..tostring(accountName), 354, screenHeight-703, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 2, "pricedown" ) end and get Account is Serverfunction see this https://wiki.multitheftauto.com/wiki/GetAccountName Link to comment
karlis Posted October 2, 2011 Share Posted October 2, 2011 Try This local root = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local player, accountName = "", "" function dxLogin() dxDrawText( getPlayerName(player).." has logged into "..tostring(accountName), 354, screenHeight-703, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 2, "pricedown" ) end function dxLogout() dxDrawText( getPlayerName(player).." have been logged out "..tostring(accountName), 354, screenHeight-703, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 2, "pricedown" ) end and get Account is Serverfunction see this https://wiki.multitheftauto.com/wiki/GetAccountName read pot above DX FUNCTIONS NEED TO BE TRIGGERED onClientRender TO CONSTANTLY DRAW SOMETHING, as this function only draws it for 1frame. Link to comment
Castillo Posted October 2, 2011 Share Posted October 2, 2011 CaPy, when you asked me for help via PM, I sent you the script with the event handler of "onClientRender", you took it off? Link to comment
CapY Posted October 3, 2011 Author Share Posted October 3, 2011 Below script it says : "this is not the whole code" , what part of that you didn't understand guys ? you need to use dx functions with the event onClientRender.seriously, you have like hundred of help topics, you should learn already. and account cant be an empty string. First read whole topic , then complain. Link to comment
karlis Posted October 3, 2011 Share Posted October 3, 2011 wtf? since when shortening code means removing necessary parts from it? how could any1 possibly tell that you did use that? you may say its common sense, but as i've learnt, in scripting forum section common sense doesn't apply in half of the cases(for you too.). 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