OnPlayerConnect Dialog Remove
#1

Well if my player connects he gets a dialog which stays like 3-6 seconds.
I want to remove this timer but I couldn't find it.

heres the onplayerconnect bar:


PHP код:
public OnPlayerConnect(playerid)
{
    new 
string[256],Query[200];
    
InDMS[playerid] =  0;
    
Fishing[playerid]= 0;
    
MSGShown[playerid] = 0;
    
PlayerInfo[playerid][AdminDuty]=0;
    
GetPlayerName(playeridPlayerInfo[playerid][pName], MAX_PLAYER_NAME);
    
GetPlayerIp(playeridPlayerInfo[playerid][pIP], 16);
    
ResetAllPlayerStats(playerid);
    
SetPlayerColor(playeridCOLOR_DEAD);
    
ResetPlayerCash(playerid); //Resetting the players cash variable to zero.
    
if (IsPlayerNPC(playerid))
    {}
    else
    {
        new 
PIP[16]; //Creates the IP string
        
GetPlayerIp(playeridPIPsizeof(PIP)); //Gets the players IP
        
format(Querysizeof(Query), "SELECT * FROM banned WHERE IP = '%s'"PIP); //Checks if the players IP is in the database, if so it will kick them :)
        
mysql_query(Query);//Queries
        
mysql_store_result(); //Stores the result
        
if (mysql_num_rows() != 0//If the ip is found
        
{
            
SendClientMessage(playeridCOLOR_ERROR"Your IP Has Been Banned Due To Abuse, Visit "WEBSITE" For More Info.");
            
Kick(playerid);
            return 
0;
        }
        
PlayerInfo[playerid][pClassselection] = 10;
        
format(stringsizeof(string), "* %s (%d) Has Joined The Server.",PlayerInfo[playerid][pName],playerid);
        
SendClientMessageToOthers(playeridCOLOR_DEADstring);
        
format(stringsizeof(string), "~g~~h~%s",ServerInfo[sMapName]);
        
TextDrawSetString(OnConnectTD1string);
        
format(stringsizeof(string), "~y~%s",VERSION);
        
TextDrawSetString(OnConnectTD3string);
        
format(stringsizeof(string), "~b~%s",WEBSITE);
        
TextDrawSetString(OnConnectTD4string);
        
TextDrawShowForPlayer(playeridOnConnectTD0);
        
TextDrawShowForPlayer(playeridOnConnectTD1);
        
TextDrawShowForPlayer(playeridOnConnectTD2);
        
TextDrawShowForPlayer(playeridOnConnectTD3);
        
TextDrawShowForPlayer(playeridOnConnectTD4);
        
TextDrawShowForPlayer(playeridOnConnectTD5);
        
format(Querysizeof(Query), "SELECT * FROM playerdata WHERE UserName = '%s'"PlayerInfo[playerid][pName]);
        
mysql_query(Query);//Queries
        
mysql_store_result(); //Stores the result
        
if (mysql_num_rows() > 0//If the user is found
        
{
            
PlayerInfo[playerid][pRegistered] = 1;
            
PlayerInfo[playerid][pLogged] = 0;
            new 
wdata[128];
            while (
mysql_retrieve_row()) //it will be running until there are no more rows to be retrieved
            
{
                switch (
CURRENT_GAMEMODE)
                {
                    case 
LOS_SANTOS:
                    {
                        
mysql_get_field("LsResume",wdata);
                        
PlayerInfo[playerid][pResume] = strval(wdata);
                        
mysql_get_field("LsClassid",wdata);
                        
PlayerInfo[playerid][pClass] = strval(wdata);
                    }
                    case 
LAS_VENTURAS:
                    {
                        
mysql_get_field("LvResume",wdata);
                        
PlayerInfo[playerid][pResume] = strval(wdata);
                        
mysql_get_field("LvClassid",wdata);
                        
PlayerInfo[playerid][pClass] = strval(wdata);
                    }
                    case 
SAN_FIERRO:
                    {
                        
mysql_get_field("SfResume",wdata);
                        
PlayerInfo[playerid][pResume] = strval(wdata);
                        
mysql_get_field("SfClassid",wdata);
                        
PlayerInfo[playerid][pClass] = strval(wdata);
                    }
                }
            }
        }
        else
        {
            
PlayerInfo[playerid][pRegistered] = 0;
            
PlayerInfo[playerid][pLogged] = 0;
            
PlayerInfo[playerid][pClass] = 0;
            
PlayerInfo[playerid][pTeam] = TEAM_LAW;
            
PlayerInfo[playerid][pSkill] = SKILL_COP;
        }
        
mysql_free_result();
        if (
CHRISTMAS == 1)
        {
            
//for (new o=0; o<60; o++) CreatePlayerObject(playerid,354,0,0,0,0,0,0);
        
}
    }
    return 
1;

Reply
#2

I am guessing it is these textdraws:

pawn Код:
TextDrawShowForPlayer(playerid, OnConnectTD0);
        TextDrawShowForPlayer(playerid, OnConnectTD1);
        TextDrawShowForPlayer(playerid, OnConnectTD2);
        TextDrawShowForPlayer(playerid, OnConnectTD3);
        TextDrawShowForPlayer(playerid, OnConnectTD4);
        TextDrawShowForPlayer(playerid, OnConnectTD5);
Reply
#3

well I removed them but it needs still time until it goes to the player request class.
Reply
#4

There is no timer set in the above code, so it is not in that code you are looking for a waiting time.

It is possible that the server is still initializing the player in that time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)