SA-MP Forums Archive
Changing Model Download When Logging in?? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP DL Edition (https://sampforum.blast.hk/forumdisplay.php?fid=92)
+--- Forum: SA-MP 0.3.DL (https://sampforum.blast.hk/forumdisplay.php?fid=90)
+--- Thread: Changing Model Download When Logging in?? (/showthread.php?tid=656043)



Changing Model Download When Logging in?? - NinjaChicken - 06.07.2018

Currently when new players connect to the server this shows up over the login box



Is it possible at all to not have that show up and wait until the player has successfully logged into the server before it begins downloading the models? Or even if its possible to hide it completely and just download in the background?


Re: Changing Model Download When Logging in?? - CantBeJohn - 06.07.2018

Your best bet is to just show your login/registration dialogs (along with everything else you have under OnPlayerConnect for the most part) AFTER a player finishes downloading everything. Which would be OnPlayerFinishedDownloading.


Re: Changing Model Download When Logging in?? - Verc - 06.07.2018

And stop using that cheat..


Re: Changing Model Download When Logging in?? - Lokii - 06.07.2018

Quote:
Originally Posted by Verc
Посмотреть сообщение
And stop using that cheat..
Some people use it to save positions faster and to save cars faster


Re: Changing Model Download When Logging in?? - Locky_ - 06.07.2018

I recommend you use part of the account read resources in OnPlayerConnect and login parameter in OnPlayerRequestClass.

OnPlayerFinishedDownloading is only called once when it connects. When reconnected (loss of connection) this callback is not called.

Compare to verify that the login parameter for the player has been shown, otherwise show and change the value of the variable.

PHP код:
public OnPlayerConnect(playerid)
{
    
ShowLogin[playerid]=false;
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    if(!
ShowLogin[playerid])
    {
        
//ShowPlayerDialog(playerid, ...);
        
ShowLogin[playerid]=true;
        return 
0;
    }
    return 
1;




Re: Changing Model Download When Logging in?? - NinjaChicken - 06.07.2018

Quote:
Originally Posted by Verc
Посмотреть сообщение
And stop using that cheat..
How is it cheating when i own and run the server haha? without it administrating it would be alot harder