stock UpdateKST() { new string[200]; new KSSlot1 = -1, KSSlot2 = -1, KSSlot3 = -1; new HKSteak=0; for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x)) if (pInfo[x][pKills] >= HKSteak) { HKSteak = pInfo[x][pKills]; KSSlot1 = x; } HKSteak = 0; for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != KSSlot1) if (pInfo[x][pKills] >= HKSteak) { HKSteak = pInfo[x][pKills]; KSSlot2 = x; } HKSteak = 0; for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != KSSlot1 && x != KSSlot2) if (pInfo[x][pKills] >= HKSteak) { HKSteak = pInfo[x][pKills]; KSSlot3 = x; } if(KSSlot1 != -1) { format(string, sizeof(string), "______Top_3_KillStreaks~n~~n~1._~g~%s_~w~(KillStreak:_%d)", PlayerName2(KSSlot1), pInfo[KSSlot1][pKills]); } if(KSSlot2 != -1) { format(string, sizeof(string), "______Top_3_KillStreaks~n~~n~1._~g~%s_~w~(KillStreak:_%d)~n~~n~2._~y~%s_~w~(KillStreak:_%d)", PlayerName2(KSSlot1), pInfo[KSSlot2][pKills], PlayerName2(KSSlot2), pInfo[KSSlot2][pKills]); } if(KSSlot3 != -1) { format(string, sizeof(string), "______Top_3_KillStreaks~n~~n~1._~g~%s_~w~(KillStreak:_%d)~n~~n~2._~y~%s_~w~(KillStreak:_%d)~n~~n~3._~y~%s_~w~(KillStreak:_%d)", PlayerName2(KSSlot1), pInfo[KSSlot1][pKills], PlayerName2(KSSlot2), pInfo[KSSlot2][pKills], PlayerName2(KSSlot3), pInfo[KSSlot3][pKills]); } TextDrawSetString(KSTextdraw, string); }
format(string, sizeof(string), "______Top_3_KillStreaks~n~~n~1._~g~%s_~w~(KillStreak:_%d)~n~~n~2._~y~%s_~w~(KillStreak:_%d)", PlayerName2(KSSlot1), pInfo[KSSlot2][pKills], PlayerName2(KSSlot2), pInfo[KSSlot2][pKills]);
Well i try explain better.
First bug. So i playing alone right? everything work fine its show like this Top 3 killstreaks 1.Name_Name - 36 (killstreaks) Then new player online, and luck what happen Top 3 killstreaks 1.Name_Name - 0 (killstreaks) 2.Second_Name - 0 (killstreaks) Second bug. So when its playing 2players textdraw luck like this Top 3 killstreaks 1.Name_Name - 0 (killstreaks) if i make kills its still show zero 2.Second_Name - 0 (killstreaks) if him make kill this textdraw show kills both of us. And its luck like this Top 3 killstreaks 1.Name_Name - 1 (killstreaks) 2.Second_Name - 1 (killstreaks) |
if(KSSlot2 != -1)
{
format(string, sizeof(string), "______Top_3_KillStreaks~n~~n~1._~g~%s_~w~(KillStreak:_%d)~n~~n~2._~y~%s_~w~(KillStreak:_%d)", PlayerName2(KSSlot1), pInfo[KSSlot2][pKills], PlayerName2(KSSlot2), pInfo[KSSlot2][pKills]);
}
PlayerName2(KSSlot1), pInfo[KSSlot2][pKills]// player 1's score is player2's score
PlayerName2(KSSlot1), pInfo[KSSlot1][pKills]
if(killerid != INVALID_PLAYER_ID) { pInfo[killerid][pKills]++; UpdateKST(); }
ok.. possibly is here
PHP код:
PHP код:
PHP код:
|