23.04.2012, 19:18
how i can set after SetTimer 1500 m to show register or login dialog (how i can make the login register dialog to show after 1500 m/s)
this is my onplayerconnect
this is my onplayerconnect
PHP код:
public OnPlayerConnect(playerid)
{
TogglePlayerSpectating(playerid, true);
ForceClassSelection(playerid);
SetPVarInt(playerid, "Intro", 0);
SetTimerEx("ShowIntro", 1000, 0, "d", playerid);
ScoreTimer[playerid] = SetTimerEx("AddScore", 3600000, true, "i", 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;
format(string, sizeof(string), "%s.ini", PlayerName(playerid));
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{80FF00}[ S]{FF0000}[0.3]\n{80FF00}Моля регистрирай твоя акаунт преди да се логнеш");
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_PASSWORD,"Регистрация:",regstring,"Регистрирай","Излез");
return 1;
}
else
{
gPlayerAccount[playerid] = 0;
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}[ B{80FF00}[ S-{FF0000}[0.3]\n{80FF00}Името е регистрирано. Моля, въведи твоята парола");
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Влизане:",loginstring,"Влез","Излез");
return 1;
}
}