TDK(RU) Posted January 24, 2010 Share 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) Link to comment
TDK(RU) Posted January 24, 2010 Author Share 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) Link to comment
eAi Posted January 24, 2010 Share 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. Link to comment
eAi Posted January 24, 2010 Share 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. Link to comment
TDK(RU) Posted January 25, 2010 Author Share Posted January 25, 2010 thank you... i have image meta and part of script... how i can show only when players join ?? Link to comment
TDK(RU) Posted January 25, 2010 Author Share Posted January 25, 2010 thank you... i have image meta and part of script... how i can show only when players join ?? Link to comment
subenji99 Posted January 25, 2010 Share 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. Link to comment
subenji99 Posted January 25, 2010 Share 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. Link to comment
TDK(RU) Posted January 30, 2010 Author Share 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 Link to comment
robhol Posted January 30, 2010 Share 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. 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