30.10.2012, 15:33
How i can make when any player connect first to show him the dialog with with rules.
This is my on player connect:
This is my on player connect:
PHP код:
public OnPlayerConnect(playerid)
{
new string[MAX_PLAYER_NAME];
ResetStats(playerid);
//police
BigEar[playerid] = 0;
OnDuty[playerid] = 0;
JailPrice[playerid] = 0;
HelpEnabled[playerid] = true;
//=======================
Enabled[playerid]=0;
Pers[playerid]=0;
//MAP ICONS
SetPlayerMapIcon(playerid, 0, 2495.6240,-1669.8031,13.3359, 19, -1);
if(!dini_Exists(string))
{
gPlayerAccount[playerid] = 0;
new regstring[256];
new regname[64];
SendClientMessage(playerid, COLOR_YELLOW, "Ти нямаш акаунт. Моля, регистрирай твоя акаунт.");
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{FFFFFF}[ B-U-L-G-A-R-I-A-N ]{80FF00}[ S-E-R-V-E-R]{FF0000}[0.3]\n{80FF00}Моля регистрирай твоя акаунт преди да се логнеш");
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Регистрация:",regstring,"Регистрирай","Излез");
return 1;
}
else
{
gPlayerAccount[playerid] = 1;
new loginstring[256];
new loginname[64];
SendClientMessage(playerid, COLOR_YELLOW, "SERVER: Това име е регистрирано.");
SendClientMessage(playerid, COLOR_WHITE, "HINT: Ти може да се логнеш като си въведеш паролата");
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FFFFFF}server{80FF00}server{FF0000}[0.3]\n{80FF00}Името е регистрирано. Моля, въведи твоята парола");
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Влизане:",loginstring,"Влез","Излез");
return 1;
}
}