29.07.2012, 13:02
I still need more help I think I failed at the connect... 
Here's my OnPlayerConnect.

Here's my OnPlayerConnect.
Код:
public OnPlayerConnect(playerid)
{
new dialog[128],string[150],stringconsole[150],ip[16],name[20],country[20];
format(string, 35, Player_File, GetName(playerid));
if(!INI_Exists(string))
{
format(dialog, sizeof(dialog),""COL_BLUE"Name "COL_WHITE"%s "COL_YELLOW"isn't registered\n\nPlease typepassword", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_RED"Welcome on my server", dialog, "Register", "Exit");
}
else
{
format(dialog, sizeof(dialog),""COL_YELLOW"Name "COL_WHITE"%s "COL_YELLOW"is registered\n\nPlease login", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, ""COL_YELLOW"Welcome To Paradise City",dialog, "Login", "Exit");
}
SetPVarInt(playerid, "Join", 1);
GetPlayerIp(playerid, ip, sizeof(ip));
GetPlayerName(playerid,name,sizeof(name));
GetPlayerCountry(playerid,country,sizeof(country));
format(string, 150, "%s has Connected with ip: %s ", name, ip); if(P_Data[playerid][pAdmin] < 1)
format(stringconsole, 150, "[info]%s has Connected with ip: %s ", name, ip); if(P_Data[playerid][pAdmin] < 1)
printf(stringconsole);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(P_Data[i][pAdmin] >= 1)
{
SCM(i,COLOR_RED,string);
}
}
return 1;
}

