Tando Posted January 31, 2019 Share Posted January 31, 2019 addEvent("vip",true) addEventHandler("vip",root,function(player) GUIEditor.label[5] = guiCreateLabel(14, 77, 298, 20, "Account Name:"..getAccountName(getPlayerAccount()), false, vipwindow) guiSetFont(GUIEditor.label[5], "clear-normal") GUIEditor.label[2] = guiCreateLabel(14, 97, 298, 20, "VIP: "..getElementData(getLocalPlayer(), "VIP"), false, vipwindow) guiSetFont(GUIEditor.label[2], "clear-normal") GUIEditor.label[3] = guiCreateLabel(14, 117, 298, 20, "VIP End: "..getElementData(getLocalPlayer(), "duration"), false, window) guiSetFont(GUIEditor.label[3], "clear-normal") This client Side but not Full Problem is Account Name and VIP End it's make Full GUI BUG VIP End = Duration on Database not GetElementData so how to fix it Link to comment
AncienT Posted January 31, 2019 Share Posted January 31, 2019 28 minutes ago, (SAUG)Tando said: addEvent("vip",true) addEventHandler("vip",root,function(player) GUIEditor.label[5] = guiCreateLabel(14, 77, 298, 20, "Account Name:"..getAccountName(getPlayerAccount()), false, vipwindow) guiSetFont(GUIEditor.label[5], "clear-normal") GUIEditor.label[2] = guiCreateLabel(14, 97, 298, 20, "VIP: "..getElementData(getLocalPlayer(), "VIP"), false, vipwindow) guiSetFont(GUIEditor.label[2], "clear-normal") GUIEditor.label[3] = guiCreateLabel(14, 117, 298, 20, "VIP End: "..getElementData(getLocalPlayer(), "duration"), false, window) guiSetFont(GUIEditor.label[3], "clear-normal") This client Side but not Full Problem is Account Name and VIP End it's make Full GUI BUG VIP End = Duration on Database not GetElementData so how to fix it Probably the data does not exist, use / debugscript 3 to see the error Link to comment
Tando Posted January 31, 2019 Author Share Posted January 31, 2019 (edited) 22 minutes ago, AncienT said: Probably the data does not exist, use / debugscript 3 to see the error ERROR: ettempt to call global 'getPlayerAccount' (a nil value) getAccountName(getPlayerAccount()) changed to getAccountName(getLocalPlayer()) ERORR : ettempt to call global 'getAccountName' (a nil value) Edited January 31, 2019 by (SAUG)Tando Link to comment
AncienT Posted January 31, 2019 Share Posted January 31, 2019 16 minutes ago, (SAUG)Tando said: ERROR: ettempt to call global 'getPlayerAccount' (a nil value) getAccountName(getPlayerAccount()) changed to getAccountName(getLocalPlayer()) ERORR : ettempt to call global 'getAccountName' (a nil value) This function is only for serverside. You need send value of account name to clientside using trigger or give data to player with accountname Link to comment
Tando Posted January 31, 2019 Author Share Posted January 31, 2019 (edited) 18 minutes ago, AncienT said: This function is only for serverside. You need send value of account name to clientside using trigger or give data to player with accountname Thanks i have made it Edited January 31, 2019 by (SAUG)Tando Link to comment
AncienT Posted January 31, 2019 Share Posted January 31, 2019 (edited) 39 minutes ago, (SAUG)Tando said: ERROR: ettempt to call global 'getPlayerAccount' (a nil value) getAccountName(getPlayerAccount()) changed to getAccountName(getLocalPlayer()) ERORR : ettempt to call global 'getAccountName' (a nil value) You can use this function, paste in serverside function setAcc(_,account) setElementData(source,"Account",getAccountName(account)) end addEventHandler("onPlayerLogin",getRootElement(),setAcc) 19 minutes ago, (SAUG)Tando said: can u explan to me ? and remplace "Account Name:"..getAccountName(getPlayerAccount()) by "Account Name: "..getElementData("Account",getLocalPlayer()) Edited January 31, 2019 by AncienT Link to comment
Tando Posted January 31, 2019 Author Share Posted January 31, 2019 2 minutes ago, AncienT said: Previous Page Next Page You can use this function function setAcc(_,account) setElementData(source,"Account",getAccountName(account)) end addEventHandler("onPlayerLogin",getRootElement(),setAcc) Previous Page Next Page and remplace "Account Name:"..getAccountName(getPlayerAccount()) by "Account Name: "..getElementData("Account",getLocalPlayer()) Thanks alot Link to comment
AncienT Posted January 31, 2019 Share Posted January 31, 2019 2 minutes ago, (SAUG)Tando said: Thanks alot Your welcome 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