Code: Select all
public Message() { for(new i; i < MAXP; i++) if(is_user_connected(i)) print_color(i, "!g%s!y %L", Prefix, i, "SVMESSAGE");} public HandleSay(id){ new Message[192], None[2][32], Chat[192], Alive[16]; read_args(Message, 191); remove_quotes(Message); formatex(None[0], 31, ""); formatex(None[1], 31, " "); if(Message[0] == '@' || Message[0] == '!' || equal (Message, "")) return PLUGIN_HANDLED; if(!is_user_alive(id)) Alive = "*DEATH* "; else Alive = ""; if(!equali(Message, None[0]) && !equali(Message, None[1])) { if(Logined[id]) { formatex(Chat, 191, "^1%s^4[%s] ^3%s^1 : %s", Alive, Ranks[CurrentRank[id]], Name[id], Message); } switch(cs_get_user_team(id)) { case CS_TEAM_T: ColorChat(0, RED, Chat); case CS_TEAM_CT: ColorChat(0, BLUE, Chat); case CS_TEAM_SPECTATOR: ColorChat(0, GREY, Chat); } return PLUGIN_HANDLED; } return PLUGIN_HANDLED;} public Death(){ new id = read_data(1); new x = read_data(2); if(id == 0 || id == x || x == 0 || !Logined[id]) { return; } new DollarDrop = random_num(MinDollarDrop, MaxDollarDrop); Dollars[id] += DollarDrop; set_hudmessage(0, 255, 0, -1.00, 0.85, 0, 6.0, 2.0); ShowSyncHudMsg(id, dSync, "+%d$", x); new Drop = random_num(1, 100); if(FoundCasesChance >= Drop) { DropCase(id); } else if(FoundCasesChance+FoundKeyChance >= Drop) { for(new i; i < MAXP; i++) if(is_user_connected(i)) print_color(i, "!g%s!y %L", Prefix, i, "FOUND", Name[id], KeyName); Keys[id]++; } Kills[id]++; if(RankKills[CurrentRank[id]+1] <= Kills[id] && RankKills[CurrentRank[id]+1] != 0) { CurrentRank[id]++; print_color(id, "!g%s!y %L", Prefix, id, "RANKNEWLV", Ranks[CurrentRank[id]]); } SQL_UpdateUser(id);} public DropCase(id){ new RandomNum; RandomNum = random(1001); for(new i = 1; i < sizeof(Case_Data); i++) { if(Case_Data[i][1][0] <= RandomNum) { for(new x; x < MAXP; x++) if(is_user_connected(x)) print_color(x, "!g%s!y %L", Prefix, x, "FOUND", Name[id], Case_Data[i][0]); Cases[id][i]++; break; }