13.04.2018, 12:57
Код:
public OnPlayerConnect(playerid) { new string[330]; format(string, sizeof(string), "%s joined the server.", GetName(playerid)); SCMToAll(-1, string); AdminDuty[playerid] = 0; CountDeaths[playerid] = 0; StartDeathTick[playerid] = 0; PInfo[playerid][Cash] = 0; PInfo[playerid][Score] = 0; PInfo[playerid][Kills] = 0; PInfo[playerid][Deaths] = 0; RemoveBuilding(playerid); new path[32], ip[16]; GetPlayerIp(playerid, ip, sizeof(ip)); format(path, sizeof(path), "/Banned/%s.ini", ip); if(fexist(UserPath(playerid))) { new b_string[ 330 ]; INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid); if (PInfo[playerid][pBanned]) { format(b_string, sizeof(b_string), ""COL_WHITE"You are banned from this server."); ShowPlayerDialog(playerid, D_BANNED, DIALOG_STYLE_MSGBOX, "Acc", b_string, "Close", ""); Kick(playerid); } else { format(string, sizeof(string), "Welcome to Hunud CnR Server.\nYou are already registered.", GetName(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Exit"); } } else { new r_string[ 180 ]; format(r_string, sizeof(r_string), "Welcome to Hunud CnR Server.\nYou are not registered.", GetName(playerid)); ShowPlayerDialog(playerid, D_REGISTER, DIALOG_STYLE_PASSWORD, "Register", r_string, "Register", "Exit"); } //--------------// for (new i; i < sizeof(AnimationLibraries); i++) { ApplyAnimation(playerid, AnimationLibraries[i], "null", 0.0, 0, 0, 0, 0, 0); } TimeCount[playerid] = SetTimerEx ("TotalPlay", 2000, true, "d", playerid); OPAC[playerid] = SetTimerEx("AntiC", 4500, true, "i", playerid); return 1; }