pcisoft Posted May 23, 2016 Share Posted May 23, 2016 Hello, I have a RolePlay server, I want if a player connect and still downloading, can't play I want him to see his like a camera moving on the map or at least don't move from a specific place (Example: Visit CST server and look how you wait for the download to finish) I want help in something else, my Login Panel contains Updates from an other resource but I need to add more updates manually, the problem is when I restart the Login Panel Resource it gets directly on your screen (even when you are already connected addEventHandler("onClientResourceStart", resourceRoot, function() questions = { {"Who was your childhood friend?"}, {"When did you start to play MTA?"}, {"How did you find our server?"}, {"What is your mothers name?"}, {"What is your favorite color?"}, } GUIEditor.window[1] = guiCreateWindow(rx / 2 - 261, ry / 2 - 259, 523, 518, "CAG - Login Screen", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) loginwarning = guiCreateLabel(150, 190, 467, 63, "Welcome To CAG!Play faire,Have Fun", false, GUIEditor.window[1]) -- New guiLabelSetColor(loginwarning,0,235,255) --New guiSetFont(loginwarning,"default-bold-small") -- New GUIEditor.label[1] = guiCreateLabel(24, 37, 75, 22, "Username:", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 255, 255, 255) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.edit[1] = guiCreateEdit(109, 30, 174, 33, "", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(24, 78, 75, 19, "Password:", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "clear-normal") guiLabelSetVerticalAlign(GUIEditor.label[2], "center") remember_username = guiCreateCheckBox(301, 37, 158, 18, "Remember Username", false, false, GUIEditor.window[1]) remember_password = guiCreateCheckBox(301, 78, 165, 18, "Remember Password", false, false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(109, 69, 174, 33, "", false, GUIEditor.window[1]) guiEditSetMasked(GUIEditor.edit[2], true) GUIEditor.button[1] = guiCreateButton(19, 128, 115, 35, "Login", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(144, 128, 115, 35, "Create an Account", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(269, 128, 115, 35, "Forgot Password?", false, GUIEditor.window[1]) GUIEditor.tabpanel[1] = guiCreateTabPanel(18, 238, 491, 266, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Updates", GUIEditor.tabpanel[1]) GUIEditor.tab[2] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) GUIEditor.tab[3] = guiCreateTab("Commands", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateMemo(6, 13, 475, 219, "Friday 28th February 2016 \n- Added bokilla as Staff L1(PcIsOft) \n- Ghazitto kicked from staff for being Inactive(PcIsOft) \nMonday 24th February 2016\n- Created server Updates!(PcIsOft)",false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.gridlist[1], true) that's some of the Login GUI I want to load the updates (in guiCreateMemo) from SQL file or add updates by a simple command like /addupdate or something THANKS! Link to comment
mint3d Posted May 23, 2016 Share Posted May 23, 2016 the problem is when I restart the Login Panel Resource it gets directly on your screen (even when you are already connected That is because you're using onClientResourceStart that's your first problem that you need to fix if you don't want it to show up. Link to comment
pcisoft Posted May 23, 2016 Author Share Posted May 23, 2016 the problem is when I restart the Login Panel Resource it gets directly on your screen (even when you are already connected That is because you're using onClientResourceStart that's your first problem that you need to fix if you don't want it to show up. I know !!! I need to replace it but with what ? Link to comment
Captain Cody Posted May 24, 2016 Share Posted May 24, 2016 https://wiki.multitheftauto.com/wiki/OnClientPlayerJoin Link to comment
Tomas Posted May 24, 2016 Share Posted May 24, 2016 https://wiki.multitheftauto.com/wiki/OnClientPlayerJoin It will not work neither, he must download the resource first in order to get it working. You must use text item functions which are server-sided so you don't need to download the resource. Link to comment
Captain Cody Posted May 24, 2016 Share Posted May 24, 2016 Or you can have it check server side if the player if player is guest /Not logged in/ if so then trigger. Link to comment
pcisoft Posted May 24, 2016 Author Share Posted May 24, 2016 use onPlayerLogin then Are you serious ??? Im Talking About a LOGIN PANEL !!!!! Link to comment
Captain Cody Posted May 24, 2016 Share Posted May 24, 2016 @Shaman123 please read the first post before you post. Link to comment
pcisoft Posted May 24, 2016 Author Share Posted May 24, 2016 If you can't help in the login panel, that's okay I need help in something else I want when the player join and still downloading can't play, I want him see a text and the camera on a place of the map (Like CST Server) Link to comment
Tomas Posted May 24, 2016 Share Posted May 24, 2016 If you can't help in the login panel, that's okayI need help in something else I want when the player join and still downloading can't play, I want him see a text and the camera on a place of the map (Like CST Server) There you go an example, you'll need to adequate it. https://github.com/nokizorque/GTI-sourc ... creen.slua Link to comment
Bean666 Posted May 25, 2016 Share Posted May 25, 2016 If you can't help in the login panel, that's okayI need help in something else I want when the player join and still downloading can't play, I want him see a text and the camera on a place of the map (Like CST Server) ok calm your tits haha , if you want to set the camera on a place use setCameraTarget Link to comment
pcisoft Posted May 25, 2016 Author Share Posted May 25, 2016 ok calm your tits haha thanks for the function Link to comment
pcisoft Posted May 25, 2016 Author Share Posted May 25, 2016 If you can't help in the login panel, that's okayI need help in something else I want when the player join and still downloading can't play, I want him see a text and the camera on a place of the map (Like CST Server) There you go an example, you'll need to adequate it. https://github.com/nokizorque/GTI-sourc ... creen.slua Man that resource is good but,... I want the words get deleted after the resource download finish is there an event handler like e.g: onPlayerResourceDownloaded(does not exist) or something like that THANKS!! Link to comment
Castillo Posted May 25, 2016 Share Posted May 25, 2016 If you can't help in the login panel, that's okayI need help in something else I want when the player join and still downloading can't play, I want him see a text and the camera on a place of the map (Like CST Server) ok calm your tits haha , if you want to set the camera on a place use setCameraTarget That function is not for that. 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