18.03.2014, 11:10
Код:
new string[128]; switch (reason) { case 0: { format(string, sizeof(string), "%s has left the server (timeout).", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); if(PlayerCuffed[playerid] != 0) { strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64); strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (timeout)", 64); PlayerInfo[playerid][pJailed] = 3; PlayerInfo[playerid][pJailTime] += 30*60; } } case 1: { format(string, sizeof(string), "%s has left the server (leaving).", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); if(PlayerCuffed[playerid] != 0) { strcpy(PlayerInfo[playerid][pPrisonedBy], "Server", 64); strcpy(PlayerInfo[playerid][pPrisonReason], "Logging while cuffed (leaving)", 64); PlayerInfo[playerid][pJailed] = 3; PlayerInfo[playerid][pJailTime] += 20*60; } } case 2: { format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW); } }
Код:
for(new i = 0; i < MAX_PLAYERS; i++) { new IC[128]; format(IC, sizeof(IC), "%s says: %s", GetPlayerNameEx(playerid), text); if(i == playerid) continue; if(BigEar[i] == 1) { SendClientMessage(i, COLOR_GRAD2, IC); } }
Код:
new BigEar[MAX_PLAYERS];