Dobry, mógłby ktoś mi pomóc zrobić ten kod tak aby działał to znaczy kompilował się poprawnie i dodał fukcje losowej wartości $ np od 400-800.
new cash = 800 ---> ile pieniedzy ma dostac najlepszy gracz rundy
oraz dodanie koloru do ( + - kolor zielony ) ( " - kolor teamu )
(") (+) (+) (+)
*** Najlepszy Gracz poprzedniej rundy %s. Zabil %d osob, Otrzymal %d$"
#include <amxmodx> #include <cstrike> new frags[32], c_best, c_player; new cash = 800 public plugin_init() { register_plugin("cash4thebest", "1.0", "Syczaj"); register_logevent("Poczatek_Rundy", 2, "1=Round_Start"); register_logevent("Koniec_Rundy", 2, "1=Round_End"); } public client_death(kid, vid, wid, hitbox, tk) { if(vid != kid && tk = 0;) frags[kid] += 1; } public client_disconnect(id){ frags[id] = 0; } public Poczatek_Rundy() { new name[35], iPlayers[32], iNum, id get_user_name(c_player, name, 34); client_print(c_player, print_chat,"*** Najlepszy Gracz poprzedniej rundy %s. Zabil %d osob, Otrzymal %d$$",name,c_best,cash); if(is_user_connected(c_player){ if(cs_get_user_money(c_player)+cash < 16000){ cs_set_user_money(c_player, cs_get_user_money(c_player)+cash); } else{ cs_set_user_money(c_player, 16000); } } get_players(iPlayers, iNum) for(new i=0; i<iNum; i++){ id = iPlayers[i]; if(is_user_connected(id)){ frags[id] = 0; } } } public Koniec_Rundy() { new iPlayers[32], iNum, id; c_best = 0; get_players(iPlayers, iNum); for(new i=0; i<iNum; i++){ id = iPlayers[i]; if(is_user_connected(id) && frags[id] > c_best){ c_best = frags[id]; c_player = id; } } }
Użytkownik barbeznazwy123 edytował ten post 08.11.2016 18:51