Is Correct this?
#1

Is correct?

Код:
public OnPlayerConnect(playerid)
{
	InitFly(playerid);
	new string[256], playername[MAX_PLAYER_NAME], file[255];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "%s s-a conectat la Romania Cops And Robbers!", playername);
    Announce(string);
    IsPlayerLogged[playerid] = 0;
	RecentlyRobbed[playerid] = 0;
	SelectBM[playerid] = 0;
	AMMUBOX[playerid] = 0;
	CSKINZ[playerid] = 0;
	CSKINU[playerid] = 0;
	ReportTime[playerid] = 0;
	CSKIN[playerid] = 0;
	CHALLBOX[playerid] = 0;
	IcmdCar[playerid][CarcmdI] = -1;
	IsSpawned[playerid] =0;
	GPSTimer[playerid] = 0;
	HaveGPS[playerid] = false;
	Muted[playerid] = 0;
	
	//Text Draws
	TextDrawShowForPlayer(playerid, BOX);
	TextDrawShowForPlayer(playerid, Welcome);
	TextDrawShowForPlayer(playerid, text1);
	TextDrawShowForPlayer(playerid, text2);
	TextDrawShowForPlayer(playerid, text3);
	HaveAmenda[playerid] = false;
	HaveLive[playerid] = false;
	HaveReport[playerid] = false;
	EventActiv[playerid] = false;
 	InEvent[playerid] = false;
	RequestLive[playerid] = false;
	if(AccountInfo[playerid][pBanned] == 1)
	{
 	SCM(playerid, blue, "---------------------------BANNED-------------------------------");
 	SCM(playerid, COLOR_ERROR, "Ai ban pe acest server");
 	SCM(playerid, COLOR_ERROR, "Daca crezi ca ai luat ban degeaba poti face o cerere de unban pe:");
 	SCM(playerid, COLOR_ERROR, "http://cnrromania.1to.us/index.php?topic=3.0");
 	SCM(playerid, blue, "---------------------------BANNED-------------------------------");
 	FixedKick(playerid);
 	}
	new Registre[250];
	format(file, sizeof(file), "%s.cfg", playername);
	if(fexist(file))
	{
	GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
    format(Registre,sizeof(Registre),"{FFFF00}Bun venit, {00FFFF}%s!\n\n{FFFF00}Intregistreaza-te inainte sa continui!",playername);
    ShowPlayerDialog(playerid,LoginName,DIALOG_STYLE_INPUT,"Login",Registre,"Logare","Inchide");
    }
    else
    if(!fexist(file))
	{
	GetPlayerName(playerid,playername,MAX_PLAYER_NAME);
    format(Registre,sizeof(Registre),"{FFFF00}Bun venit, {00FFFF}%s!\n\n{FFFF00}Intregistreaza-te inainte sa continui!",playername);
    ShowPlayerDialog(playerid,RegisterName,DIALOG_STYLE_INPUT,"Register",Registre,"Inregistrare","Inchide");
    }
	return true;
}
In onplayerconnect with:
Код:
if(AccountInfo[playerid][pBanned] == 1)
	{
 	SCM(playerid, blue, "---------------------------BANNED-------------------------------");
 	SCM(playerid, COLOR_ERROR, "Ai ban pe acest server");
 	SCM(playerid, COLOR_ERROR, "Daca crezi ca ai luat ban degeaba poti face o cerere de unban pe:");
 	SCM(playerid, COLOR_ERROR, "http://cnrromania.1to.us/index.php?topic=3.0");
 	SCM(playerid, blue, "---------------------------BANNED-------------------------------");
 	FixedKick(playerid);
 	}
Is correct to kick player when connect?
Reply
#2

You can, but i don't think, account stats are loading in OnPlayerConnect .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)