Mam pytanie. Jak zrobić aby dana klasa miała 1/1 że ukradnie ofierze 150$?
co do 1/1 zrobiłem tak:
Stworzyłem player_b_theif2
public add_theif_bonus2(id,attacker_id)
{
if (player_b_theif2[attacker_id] > 0)
{
new roll1 = random_num(1,1)
if (roll1 == 1)
{
if (cs_get_user_money(id) > player_b_theif2[attacker_id])
{
cs_set_user_money(id,cs_get_user_money(id)-player_b_theif2[attacker_id])
if (cs_get_user_money(attacker_id) + player_b_theif2[attacker_id] <= 16000)
{
cs_set_user_money(attacker_id,cs_get_user_money(attacker_id)+player_b_theif2[attacker_id])
}
}
else
{
new allthatsleft = cs_get_user_money(id)
cs_set_user_money(id,0)
if (cs_get_user_money(attacker_id) + allthatsleft <= 16000)
{
cs_set_user_money(attacker_id,cs_get_user_money(id) + allthatsleft)
}
}
}
}
}
Teraz jak podpiąć to pod klasę? i jak zrobić aby zabierało po 150$?
Użytkownik KoRnY edytował ten post 12.03.2010 18:33