Raised This Month: $51 Target: $400
 12% 

[SOLVED][REQ] Convert ping to frags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 01-06-2010 , 22:30   [SOLVED][REQ] Convert ping to frags
Reply With Quote #1

Help to make a plugin that convert ping to frags

In other words,
when a player kill an enemy , if the player has more than 100 ping ,then ,the player will got 3 frags.
also , when a player kill an enemy , if the player has 50~100 ping ,then ,the player will got 2 frags,
or , when a player kill an enemy , if the player has less than 50 ping ,then ,the player will got 1 frag

I think the idea is fair for the expert who without nice ping ...

But, who can help ?....

Last edited by epic .; 02-07-2010 at 22:00. Reason: add "solved" to the title
epic . is offline
Send a message via ICQ to epic .
.OM NOM NOM NOM
BANNED
Join Date: Dec 2009
Old 01-06-2010 , 22:57   Re: [REQ] Convert ping to frags
Reply With Quote #2

Do you see any point in this?
.OM NOM NOM NOM is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-06-2010 , 23:41   Re: [REQ] Convert ping to frags
Reply With Quote #3

I guess theoretically there is a little merit to this idea. However, in my experience, people with 300 ping do better than me with 100. It's totally illogical!
__________________
fysiks is offline
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 01-08-2010 , 06:39   Re: [REQ] Convert ping to frags
Reply With Quote #4

I try to make it , the code is here, it can be compiled, it can be loaded, but it do not work...

could some people tell me where is the mistakes? thanks

Code:
#include <amxmodx>
#include <fun>
#define PLUGIN  "Convert ping to frags"
#define VERSION "0.1"
#define AUTHOR  "epic"
new High_ping
new Extra_frags
public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   register_event("DeathMsg", "DeathEvent", "a")
   High_ping = register_cvar( "Convertpingtofrags_Highping", "100" )
   Extra_frags = register_cvar( "Convertpingtofrags_Extrafrags", "2" )
}
public DeathEvent()
{
   new victimId = read_data(2)
   new killerId = read_data(1)
   if (!killerId || killerId==victimId)
      return PLUGIN_CONTINUE
   if (get_user_team(killerId)==get_user_team(victimId))
      return PLUGIN_CONTINUE
   CheckPing(killerId)
   return PLUGIN_CONTINUE
}
public CheckPing(id)
{
   new p, l
   get_user_ping(id, p, l)
   if (p > High_ping)
   {
      new frags
      frags = get_user_frags(id)
      set_user_frags(id, frags+Extra_frags)
   }
   return PLUGIN_CONTINUE
}

Last edited by epic .; 01-11-2010 at 02:39.
epic . is offline
Send a message via ICQ to epic .
Old 01-11-2010, 02:35
epic .
This message has been deleted by YamiKaitou. Reason: bump
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 01-12-2010 , 00:30   Re: [REQ] Convert ping to frags
Reply With Quote #5

Quote:
Originally Posted by .OM NOM NOM NOM View Post
Do you see any point in this?
what point do you mean ?
epic . is offline
Send a message via ICQ to epic .
Reply



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 06:23.


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