yoya99 Posted July 7, 2014 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
MIKI785 Posted July 7, 2014 Posted July 7, 2014 It looks like you're combining client and server... don't use onPlayerConnect but onClientResourceStart
Arnold-1 Posted July 8, 2014 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
Max+ Posted July 8, 2014 Posted July 8, 2014 Yeah , Sorry i forgot, dx have to be only Render events non of us are perfect
Arnold-1 Posted July 8, 2014 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.
Max+ Posted July 8, 2014 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
yoya99 Posted July 8, 2014 Author Posted July 8, 2014 thx for the answers guys i will check it out,if it works now
yoya99 Posted July 8, 2014 Author Posted July 8, 2014 ok thx but how to to make it disappeare after logging in?
MIKI785 Posted July 8, 2014 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
Arnold-1 Posted July 8, 2014 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 )
yoya99 Posted July 8, 2014 Author Posted July 8, 2014 I am beginner where to put this in now ? Just add it under The other?
Max+ Posted July 8, 2014 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
yoya99 Posted July 9, 2014 Author Posted July 9, 2014 and what to do with the other part where the rules are drawn??
yoya99 Posted July 14, 2014 Author Posted July 14, 2014 how can i do it if it is a guest account?? clikcing play as guest and the hide too?
Arnold-1 Posted July 14, 2014 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
-.Paradox.- Posted July 17, 2014 Posted July 17, 2014 May I know what my rules script is doing here? A moderator should lock this topic
Recommended Posts