16.06.2015, 12:47
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:
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(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME);
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
ResetAllPlayerStats(playerid);
SetPlayerColor(playerid, COLOR_DEAD);
ResetPlayerCash(playerid); //Resetting the players cash variable to zero.
if (IsPlayerNPC(playerid))
{}
else
{
new PIP[16]; //Creates the IP string
GetPlayerIp(playerid, PIP, sizeof(PIP)); //Gets the players IP
format(Query, sizeof(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(playerid, COLOR_ERROR, "Your IP Has Been Banned Due To Abuse, Visit "WEBSITE" For More Info.");
Kick(playerid);
return 0;
}
PlayerInfo[playerid][pClassselection] = 10;
format(string, sizeof(string), "* %s (%d) Has Joined The Server.",PlayerInfo[playerid][pName],playerid);
SendClientMessageToOthers(playerid, COLOR_DEAD, string);
format(string, sizeof(string), "~g~~h~%s",ServerInfo[sMapName]);
TextDrawSetString(OnConnectTD1, string);
format(string, sizeof(string), "~y~%s",VERSION);
TextDrawSetString(OnConnectTD3, string);
format(string, sizeof(string), "~b~%s",WEBSITE);
TextDrawSetString(OnConnectTD4, string);
TextDrawShowForPlayer(playerid, OnConnectTD0);
TextDrawShowForPlayer(playerid, OnConnectTD1);
TextDrawShowForPlayer(playerid, OnConnectTD2);
TextDrawShowForPlayer(playerid, OnConnectTD3);
TextDrawShowForPlayer(playerid, OnConnectTD4);
TextDrawShowForPlayer(playerid, OnConnectTD5);
format(Query, sizeof(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;
}