yoya99 Posted July 7, 2014 Share Posted July 7, 2014 hey i have this rules resource and i want that when a player join his rules are shown automatically..and when he logins or he plays as a guest his rules are disappearing... CODE REMOVED BY Solidsnake14 Link to comment
MIKI785 Posted July 7, 2014 Share Posted July 7, 2014 It looks like you're combining client and server... don't use onPlayerConnect but onClientResourceStart Link to comment
Arnold-1 Posted July 8, 2014 Share Posted July 8, 2014 CODE REMOVED BY Solidsnake14 Please stop, you don't actually know proper scripting. when dealing with dx, you have to use render events. this is how it should be. CODE REMOVED BY Solidsnake14 Link to comment
Max+ Posted July 8, 2014 Share Posted July 8, 2014 Yeah , Sorry i forgot, dx have to be only Render events non of us are perfect Link to comment
Arnold-1 Posted July 8, 2014 Share Posted July 8, 2014 It's not actually about being perfect, i noticed from your posts, you're making horrible mistakes, please learn more scripting, i believe within a month or two you will be able to help people. Link to comment
Max+ Posted July 8, 2014 Share Posted July 8, 2014 It's not actually about being perfect, i noticed from your posts, you're making horrible mistakes, please learn more scripting, i believe within a month or two you will be able to help people. Ok , Thank's for the advise Link to comment
yoya99 Posted July 8, 2014 Author Share Posted July 8, 2014 thx for the answers guys i will check it out,if it works now Link to comment
yoya99 Posted July 8, 2014 Author Share Posted July 8, 2014 ok thx but how to to make it disappeare after logging in? Link to comment
MIKI785 Posted July 8, 2014 Share Posted July 8, 2014 Theres no event for that clientsided so use triggerClientEvent... Something like this: --Server addEventHandler("onPlayerLogin", root, function () triggerClientEvent(source, "onClientPlayerLogin", root) end ) --Client addEvent("onClientPlayerLogin", true) addEventHandler("onClientPlayerLogin", root, function () removeEventHandler("onClientRender", root, showRules) end ) Should work Link to comment
Arnold-1 Posted July 8, 2014 Share Posted July 8, 2014 --Server addEventHandler("onPlayerLogin", root, function () triggerClientEvent(source, "onClientPlayerLogin", root) end ) --Client addEvent("onClientPlayerLogin", true) addEventHandler("onClientPlayerLogin", root, function () removeEventHandler("onClientRender", root, showRules) shown = false end ) Link to comment
yoya99 Posted July 8, 2014 Author Share Posted July 8, 2014 I am beginner where to put this in now ? Just add it under The other? Link to comment
Max+ Posted July 8, 2014 Share Posted July 8, 2014 No , you can see , --Server put in serverSide script , --Client put in ClientSide script , check meta.xml to know witch script is client and server Link to comment
yoya99 Posted July 9, 2014 Author Share Posted July 9, 2014 and what to do with the other part where the rules are drawn?? Link to comment
yoya99 Posted July 14, 2014 Author Share Posted July 14, 2014 how can i do it if it is a guest account?? clikcing play as guest and the hide too? Link to comment
Arnold-1 Posted July 14, 2014 Share Posted July 14, 2014 He can always hide it by pressing f3, but anyway, you can do it using an export, i cant tell you how now since i'm on phone, but read this wiki page: call Link to comment
Grafu Posted July 17, 2014 Share Posted July 17, 2014 May I know what my rules script is doing here? Link to comment
-.Paradox.- Posted July 17, 2014 Share Posted July 17, 2014 May I know what my rules script is doing here? A moderator should lock this topic Link to comment
Recommended Posts