20.07.2012, 19:21
It's supposed to show the connecting players ip for admins lvl 1 and higher... but nothing is happening but no errors or warnings..
Please help?
Please help?
Код:
public OnPlayerConnect(playerid) { new dialog[128],string[128],ip[16],name[MAX_PLAYER_NAME]; 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 on my server",dialog, "Login", "Exit"); } SetPVarInt(playerid, "Join", 1); if(P_Data[playerid][pAdmin] >= 1) { GetPlayerName(playerid,name,sizeof(name)); GetPlayerIp(playerid,ip,sizeof(ip)); format(string, 150, "%s has Connected with ip: %s.", name, ip); SCMToAll(COLOR_RED,string); } return 1; }