Raised This Month: $ Target: $400
 0% 

Handicap Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-27-2006 , 08:11   Re: Handicap Mod
Reply With Quote #1

organized I want the handicap to be reset on map change not on round start it isnt if you kill this many in a row its if you get that many frags a map, which most newbs dont besides if you want the people with 5 kills not to be punished but change the 5kill cvar to 100 I do know what I am doing but thanks
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 10-27-2006 , 09:32   Re: Handicap Mod
Reply With Quote #2

Code:
public event_new_round() {         for(new i=0;i<=get_maxplayers();i++) {                 new killer = g_killer[i]         g_killer[i]=0                 if(is_user_connected(i) && killer) {                         if(get_user_frags(killer) >= 5 && get_user_frags(killer) <= 10) {                 new kills = get_user_frags(killer)                 new health = get_cvar_num("amx_5kills")                                 set_user_health(killer, health)                 client_print(killer, print_chat, "For having %i kills you will start with %i helath", kills, health)             }             else if(get_user_frags(killer) >= 11 && get_user_frags(killer) <= 20) {                 new kills = get_user_frags(killer)                 new health = get_cvar_num("amx_11kills")                                 set_user_health(killer, health)                 client_print(killer, print_chat, "For having %i kills you will start with %i helath", kills, health)             }             else if(get_user_frags(killer) >= 21) {                 new kills = get_user_frags(killer)                 new health = get_cvar_num("amx_21kills")                                 set_user_health(killer, 40)                 client_print(killer, print_chat, "For having %i kills you will start with %i helath", kills, health)             }         }     } }

Even a noob can get more than 5 kills in a map.

This whole section runs on every new round.

Let's break it down. A server will usually run a map for about 30 mins.

30 mins is a lot of time, even for a noob to get five kills.

Once the noob gets 5 kills or more, they will start every round after that with 80hp. The noob has now been handicapped. Granted your plugin does check if the player killed someone but even if a person killed someone then died, they would still be stored as g_killer until the new round.

Another variable to consider.....bomb success/defuse rewards.

For every successfull bomb explosion/defusion, the player is awarded +3 frags.

Now, lets say they have 1 frag at new round. Player kills one player. Now 2 frags. Player plants bomb and successfully explodes. Player is now stored as g_killer and is awarded 3 frags for bomb explosion. Now although the players frag count is 5, they only actually got 1 frag. So now the player is being "handicapped" for doing his map objective.

After about 15 mins of maptime, everyone will be starting with 60 hp or less.

You said you want the handicap reset on mapchange, but your plugin constantly runs and checks every new round for current frag count then proceeds to set each players health based on what their current frag count is. So actually, your plugin isnt reseting the handicap every map change.

Please refer to my first post.

Last edited by organizedKaoS; 10-27-2006 at 09:38.
organizedKaoS is offline
bigman11
Member
Join Date: Jun 2006
Location: Computer
Old 11-01-2006 , 18:42   Re: Handicap Mod
Reply With Quote #3

Quote:
Originally Posted by organizedKaoS View Post
Code:
public event_new_round() {         for(new i=0;i<=get_maxplayers();i++) {                 new killer = g_killer[i]         g_killer[i]=0                 if(is_user_connected(i) && killer) {                         if(get_user_frags(killer) >= 5 && get_user_frags(killer) <= 10) {                 new kills = get_user_frags(killer)                 new health = get_cvar_num("amx_5kills")                                 set_user_health(killer, health)                 client_print(killer, print_chat, "For having %i kills you will start with %i helath", kills, health)             }             else if(get_user_frags(killer) >= 11 && get_user_frags(killer) <= 20) {                 new kills = get_user_frags(killer)                 new health = get_cvar_num("amx_11kills")                                 set_user_health(killer, health)                 client_print(killer, print_chat, "For having %i kills you will start with %i helath", kills, health)             }             else if(get_user_frags(killer) >= 21) {                 new kills = get_user_frags(killer)                 new health = get_cvar_num("amx_21kills")                                 set_user_health(killer, 40)                 client_print(killer, print_chat, "For having %i kills you will start with %i helath", kills, health)             }         }     } }

Even a noob can get more than 5 kills in a map.

This whole section runs on every new round.

Let's break it down. A server will usually run a map for about 30 mins.

30 mins is a lot of time, even for a noob to get five kills.

Once the noob gets 5 kills or more, they will start every round after that with 80hp. The noob has now been handicapped. Granted your plugin does check if the player killed someone but even if a person killed someone then died, they would still be stored as g_killer until the new round.

Another variable to consider.....bomb success/defuse rewards.

For every successfull bomb explosion/defusion, the player is awarded +3 frags.

Now, lets say they have 1 frag at new round. Player kills one player. Now 2 frags. Player plants bomb and successfully explodes. Player is now stored as g_killer and is awarded 3 frags for bomb explosion. Now although the players frag count is 5, they only actually got 1 frag. So now the player is being "handicapped" for doing his map objective.

After about 15 mins of maptime, everyone will be starting with 60 hp or less.

You said you want the handicap reset on mapchange, but your plugin constantly runs and checks every new round for current frag count then proceeds to set each players health based on what their current frag count is. So actually, your plugin isnt reseting the handicap every map change.

Please refer to my first post.
Ok if u dont like this plugin leave dont yell at him ur retarded for yelling at him you dont have to put it on your server or wat ever.
__________________
bigman11 is offline
Send a message via MSN to bigman11
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 11-01-2006 , 20:49   Re: Handicap Mod
Reply With Quote #4

Quote:
Originally Posted by bigman11 View Post
Ok if u dont like this plugin leave dont yell at him ur retarded for yelling at him you dont have to put it on your server or wat ever.
You have no idea how this works do you.

This is the new plugin submission forum.

Plugins are submitted here for the people to view, use, and critique on.

I wasn't yelling at him, I was showing him that his initial attempt was inevitably flawed.

You yourself however, did not input any helpful information, so you should be the one to leave.

All you did was quote me on my critique of his plugin and then added your two sense.

Where's your insight into this plugin??

You have less to say than what I do, and I actually gave useful info toward this plugin. Next time read all the responses of the thread before you decide to "attack" an "attacker".
organizedKaoS is offline
freamer
Member
Join Date: Nov 2005
Old 11-02-2006 , 04:20   Re: Handicap Mod
Reply With Quote #5

Quote:
Originally Posted by bigman11 View Post
Ok if u dont like this plugin leave dont yell at him ur retarded for yelling at him you dont have to put it on your server or wat ever.
he was right to correct him
in my opinion first plugin is totally useless,but the second one can be useful thought
freamer is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 11-02-2006 , 12:02   Re: Handicap Mod
Reply With Quote #6

Rolnaaba....I found the problem for your 2nd version not setting health.

You were using the hltv event to call the new round function.

While it was printing the chat text saying your health will be set, it was calling it too soon and wasn't able to set a users health.

Heres the edited working script which I have confirmed now sets health.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> new PlayerFrags[33] new bool:PlayerDied[33] public plugin_init() {     register_plugin("Handicap Mod2", "2.0", "Rolnaaba")     register_event("DeathMsg", "Event_Death", "a")     register_logevent("Event_RoundEnd", 2, "1=Round_End")     register_cvar("amx_1sthealth", "80")     register_cvar("amx_2ndhealth", "60")     register_cvar("amx_3rdhealth", "40") } public Event_Death()     {       new killer = read_data(1)     new victim = read_data(2)         if(!PlayerDied[victim])         {         PlayerDied[victim] = true         PlayerFrags[victim] = 0     }     if(PlayerDied[killer])         {         PlayerDied[killer] = false     }         PlayerFrags[killer]++ } public Event_RoundEnd()     {     new Players[32], playerCount, i, id     get_players(Players, playerCount, "c")     for(i=0;i<playerCount;i++)         {         id = Players[i]         set_task(5.0, "Do_Health", id)     } } public Do_Health(id)     {       if(is_user_connected(id) && !PlayerDied[id])         {         if(PlayerFrags[id] >= 3 && PlayerFrags[id] <= 5)             {             new health = get_cvar_num("amx_1sthealth")                                      set_user_health(id, health)             client_print(id, print_chat, "Your health will be set to %iHP for having %i kills in a row", health, PlayerFrags[id])         }         else if(PlayerFrags[id] >= 6 && PlayerFrags[id] <= 8)             {             new health = get_cvar_num("amx_2ndhealth")                          set_user_health(id, health)             client_print(id, print_chat, "Your health will be set to %iHP for having %i kills in a row", health, PlayerFrags[id])         }         else if(PlayerFrags[id] >= 9)             {             new health = get_cvar_num("amx_3rdhealth")                          set_user_health(id, health)             client_print(id, print_chat, "Your health will be set to %iHP for having %i kills in a row", health, PlayerFrags[id])         }     } }
organizedKaoS is offline
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 10:38.


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