Raised This Month: $32 Target: $400
 8% 

Help with coding


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
connoisseur
Senior Member
Join Date: Jan 2012
Old 06-30-2013 , 04:26   Help with coding
Reply With Quote #1

bump.

Last edited by connoisseur; 07-13-2013 at 14:21.
connoisseur is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 06-30-2013 , 04:48   Re: Help with coding
Reply With Quote #2

try indexing the global killer variable

Code:
new g_killer[ 33 ];

then in the death event change to this

Code:
g_killer[ iVictim ] = iKiller // stores the killers index for that victim only. which means the next player who gets tk will have there killers index set to there variable.

then change this
Code:
public MenuHandler(iVictim, menu, item) {     switch(item)     {         case 1:         {             client_print(g_killer,print_chat, "%s has slayed you",g_vname)             user_kill(g_killer)             menu_destroy( menu )             return PLUGIN_HANDLED         }         case 0:         {             client_print(g_killer,print_chat, "%s has forgiven you",g_vname)             menu_destroy( menu )             return PLUGIN_HANDLED         }         case MENU_EXIT:         {             menu_destroy( menu )             return PLUGIN_HANDLED         }     }     menu_destroy( menu )     return PLUGIN_HANDLED }

to this
Code:
public MenuHandler(iVictim, menu, item) {     switch(item)     {         case 1:         {             client_print(g_killer[iVictim],print_chat, "%s has slayed you",g_vname)             user_kill(g_killer[iVictim])             menu_destroy( menu )             return PLUGIN_HANDLED         }         case 0:         {             client_print(g_killer[iVictim],print_chat, "%s has forgiven you",g_vname)             menu_destroy( menu )             return PLUGIN_HANDLED         }         case MENU_EXIT:         {             menu_destroy( menu )             return PLUGIN_HANDLED         }     }     menu_destroy( menu )     return PLUGIN_HANDLED }
__________________

Last edited by Blizzard_87; 06-30-2013 at 04:50.
Blizzard_87 is offline
connoisseur
Senior Member
Join Date: Jan 2012
Old 06-30-2013 , 06:01   Re: Help with coding
Reply With Quote #3

Thanks a lot Blizzard_87, I will test it on the server and post the result soon.
connoisseur 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 09:06.


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