![]() |
Checking Files
Is there a way to check if a certain file exists on the server before its downloaded by the player? With a script of course..
|
Quote:
|
Before its downloaded in any way. When its in the Graal folder, I can check it with ->
PHP Code:
|
I don't think it's possible to check that
|
Ok, lemme explain further :P I want to script a head changing system like on GK, something similar to "/head #". But I dont want to allow images which dont exist. How would I do that then? :/
|
Quote:
Or was you hoping for something built-in or on the clientside? |
Quote:
PHP Code:
|
Last time I tried fileexists() it didn't work, but that was outside the levels folder, perhaps you will have more luck with a downloadable file.
|
The recommended function to use is
headexists(filename) - tells you if the image is downloadable and can be used as head for the player |
I had the same problem for my system to check if an image didn't exist on an external webserver (like a website). I was shocked when I found out that Graal can't check that. x_X
|
A clientside function for checking if a file can be downloaded would be nice...
I hate using getimgwidth() when showing an image and having it be wrong because the image isn't downloaded yet... |
Thanks a ton all of you :)
|
| All times are GMT +2. The time now is 04:21 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.