TDK(RU) Posted January 24, 2010 Posted January 24, 2010 Hi all! i know how to create image to monitor for 15 seconds, but downloading can last not 15 seconds. Tell please as I can make picture display only for the period of loading of resources from a server on the client (Resource Downloading progress)
TDK(RU) Posted January 24, 2010 Author Posted January 24, 2010 Hi all! i know how to create image to monitor for 15 seconds, but downloading can last not 15 seconds. Tell please as I can make picture display only for the period of loading of resources from a server on the client (Resource Downloading progress)
eAi Posted January 24, 2010 Posted January 24, 2010 You can't really. I'd suggest showing an image for a short period after the player joins - if that's what you really want to do.
eAi Posted January 24, 2010 Posted January 24, 2010 You can't really. I'd suggest showing an image for a short period after the player joins - if that's what you really want to do.
TDK(RU) Posted January 25, 2010 Author Posted January 25, 2010 thank you... i have image meta and part of script... how i can show only when players join ??
TDK(RU) Posted January 25, 2010 Author Posted January 25, 2010 thank you... i have image meta and part of script... how i can show only when players join ??
subenji99 Posted January 25, 2010 Posted January 25, 2010 The easiest way to do this is not to monitor what I expect you thought as the obvious "onClientPlayerJoin", as, It is triggered for all players other than the local player. Instead, use event "onClientResourceStart", attached to "getResourceRootElement(getThisResource())". This will run your code for displaying the image for that client when it's own resource is first started. (That bit is important: don't use getRootElement() or the code will run when ANY resource starts, including maps and gamemodes) The first time a resource starts for players (assuming it was already running on the server) is after all resources have finished downloading, making this the earliest point after a player connects to run scripts on them.
subenji99 Posted January 25, 2010 Posted January 25, 2010 The easiest way to do this is not to monitor what I expect you thought as the obvious "onClientPlayerJoin", as, It is triggered for all players other than the local player. Instead, use event "onClientResourceStart", attached to "getResourceRootElement(getThisResource())". This will run your code for displaying the image for that client when it's own resource is first started. (That bit is important: don't use getRootElement() or the code will run when ANY resource starts, including maps and gamemodes) The first time a resource starts for players (assuming it was already running on the server) is after all resources have finished downloading, making this the earliest point after a player connects to run scripts on them.
TDK(RU) Posted January 30, 2010 Author Posted January 30, 2010 hm i created this, but! i don't see image when loading isn't complete... i don't see my picture anyway! help plz
robhol Posted January 30, 2010 Posted January 30, 2010 Obviously, you can't show a client-side image if that client hasn't downloaded the script and image - that's why this idea is flawed from the very outset. Your options for showing anything at all before client-side scripts are available are very limited, you'd have to make do with text displays or something.
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