Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: vito on Aug 04, 2016, 09:58 PM

Title: Is Custom Files Ready?
Post by: vito on Aug 04, 2016, 09:58 PM
Hello, is it possible to check has player downloaded all custom files or he is still downloading?
Title: Re: Is Custom Files Ready?
Post by: Diego^ on Aug 04, 2016, 10:42 PM
I created my own function for this.

function CPlayer::IsDownloading()
{
if ( this.Color.r == 255 && this.Color.g == 255 && this.Color.b == 255 ) return true;
else return false;
}

Note: If there is any class with RGB( 255, 255, 255 ), a change is necessary.

Title: Re: Is Custom Files Ready?
Post by: EK.IceFlake on Aug 04, 2016, 10:53 PM
Or you can set a variable to 1 when player joins and 0 when onplayerrequestclass
then check the variable
Title: Re: Is Custom Files Ready?
Post by: vito on Aug 05, 2016, 08:56 AM
Quote from: EK.CrystalBlue on Aug 04, 2016, 10:53 PMOr you can set a variable to 1 when player joins and 0 when onplayerrequestclass
then check the variable
So no onplayerrequestclass before all downloads will done?
Title: Re: Is Custom Files Ready?
Post by: EK.IceFlake on Aug 05, 2016, 11:59 AM
Quote from: vito on Aug 05, 2016, 08:56 AM
Quote from: EK.CrystalBlue on Aug 04, 2016, 10:53 PMOr you can set a variable to 1 when player joins and 0 when onplayerrequestclass
then check the variable
So no onplayerrequestclass before all downloads will done?
Yeah, onplayerrequestclass is called when the client wants to see a class
he doesn't feel like seeing any class before downloading all files
Title: Re: Is Custom Files Ready?
Post by: MatheuS on Aug 05, 2016, 05:50 PM
player.Download()
Title: Re: Is Custom Files Ready?
Post by: vito on Aug 05, 2016, 06:19 PM
Quote from: MatheuS on Aug 05, 2016, 05:50 PMplayer.Download()
I can't see it here https://bitbucket.org/stormeus/0.4-squirrel/src/dfdf3960226db784d7e807770ca3b1b46f51b16c/CPlayer.h?at=master&fileviewer=file-view-default
Title: Re: Is Custom Files Ready?
Post by: . on Aug 05, 2016, 06:20 PM
Quote from: vito on Aug 05, 2016, 06:19 PMI can't see it here https://bitbucket.org/stormeus/0.4-squirrel/src/dfdf3960226db784d7e807770ca3b1b46f51b16c/CPlayer.h?at=master&fileviewer=file-view-default

Probably because it's fictional.