09.01.2015, 11:40
pawn Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "Welcome to UK-DM");
SendClientMessage(playerid, COLOR_BRIGHTRED, "Hope you enjoy!");
SendClientMessage(playerid, COLOR_BRIGHTRED, "Type /commands for a list of commands");
new name[MAX_PLAYER_NAME], file[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(file, sizeof(file), ".../Users/%s.ini", name);
if(!fexist(file)) {
SendClientMessage(playerid, COLOR_YELLOW, "You are not registered, please register");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "{CC0000}Please Register", "{FFFFFF}Enter Your Password Below", "Register", "Cancel");
}
else {
new str[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(str, sizeof(str), "Welcome Back ~r~%s. Enjoy!", name);
SendClientMessage(playerid, COLOR_YELLOW, str);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "{CC0000}Please Login", "{FFFFFF}Enter Your Password Below", "Login", "Cancel");
}
return 1;