Raised This Month: $ Target: $400
 0% 

Help points for bomb planted


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tatu Eugen
Member
Join Date: Apr 2010
Old 05-06-2016 , 14:53   Help points for bomb planted
Reply With Quote #1

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;
}
__________________
Tatu Eugen is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-06-2016 , 16:20   Re: Help points for bomb planted
Reply With Quote #2

Read this
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-06-2016 , 16:52   Re: Help points for bomb planted
Reply With Quote #3

Simply add #include <csx> and the function:

PHP Code:
public bomb_planted(id)
{
    
Points[id] += 25
    Save
(id)


Last edited by OciXCrom; 05-06-2016 at 18:14.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-06-2016 , 17:45   Re: Help points for bomb planted
Reply With Quote #4

Points[id]++ means that you add 1 point to the player, if you want 25 points then you do:

Points[id]+=25
siriusmd99 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-06-2016 , 18:14   Re: Help points for bomb planted
Reply With Quote #5

I misread the question. My bad.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode