Hello i have a plugin and when you kill someone you get +1 point and save it in a file from amxmodx folder, and i whant to make when you plant the bomb you get +25 points with
public bomb_planted , down here is the code for +1 point for kill.
Thanks guys...
Code:
public client_death(Killer, Victim)
{
if(Killer == Victim)
return PLUGIN_HANDLED;
Kills[Killer]++;
if(Rang[Killer] < sizeof(Rangs) && Rang[Killer] < file_size(RangFile, 1)-1)
if(Kills[Killer] >= NeedKills[Rang[Killer]])
Rang[Killer]++;
new pPont, Name[32];
pPont += random_num(PointsMin, PointsMax);
Points[Killer] += pPont;
set_hudmessage(255, 255, 255, -1.0, 0.15, 0, 6.0, 2.0);
show_hudmessage(Killer, "+%d Points", pPont);
if(Drop >= random_num(1, 100))
{
get_user_name(Killer, Name, 31);
new x = random_num(1, 2);
if(x == 1)
{
pKey[Killer]++;
print_color(0, "!g%s!t %s !y found !gItem1!y!", Prefix, Name);
}
if(x == 2)
{
Chest[Killer]++;
print_color(0, "!g%s!t %s!y found !gItem2!y!", Prefix, Name);
}
}
Save(Killer);
return PLUGIN_CONTINUE;
}
__________________