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

[SOLVED][Help] Block Kill Frag ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 02-26-2014 , 22:07   [SOLVED][Help] Block Kill Frag ?
Reply With Quote #1

I want to block the kill frag... So that when i kill an enemy, my Kill Score is still +0 instead of +1
Could someone tell me how to do that ?

If i set -1 for pev_frags in DeathMsg Event, it's a poor way right?

Last edited by dias; 02-27-2014 at 19:24.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 02-27-2014 , 04:39   Re: [Help] Block Kill Frag ?
Reply With Quote #2

Check out this thread.

https://forums.alliedmods.net/showthread.php?t=235561
__________________
Blizzard_87 is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 02-27-2014 , 06:38   Re: [Help] Block Kill Frag ?
Reply With Quote #3

I dont want to block... I just want to add/remove frag by myself

Last edited by dias; 02-27-2014 at 06:46.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-27-2014 , 07:44   Re: [Help] Block Kill Frag ?
Reply With Quote #4

Quote:
Originally Posted by dias View Post
I dont want to block..
Are you sure, because in your first you said..
Quote:
Originally Posted by dias View Post
I want to block the kill frag... So that when i kill an enemy, my Kill Score is still +0 instead of +1
Quote:
Originally Posted by dias View Post
I just want to add/remove frag by myself
Here's one way

PHP Code:
set_user_fragsiDget_user_fragsiD ) + any number
or

PHP Code:
set_user_fragsiDget_user_fragsiD ) - any number
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 02-27-2014 , 08:35   Re: [Help] Block Kill Frag ?
Reply With Quote #5

I used that method... but sometimes my frag is negative (-1)

Last edited by dias; 02-27-2014 at 08:49.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-27-2014 , 09:26   Re: [Help] Block Kill Frag ?
Reply With Quote #6

So then simply add a check to see if the result would be below 0
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 02-27-2014 , 09:46   Re: [Help] Block Kill Frag ?
Reply With Quote #7

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Block Kill Frag","0.0.1","SmileY");

    
register_event("DeathMsg","Ev_DeathMsg","a");
}

public 
Ev_DeathMsg()
{
    new 
iKiller read_data(1);
    new 
iFrags get_user_frags(iKiller);

    if(
iFrags 0set_user_frags(iKiller,--iFrags); 

Ps. Not otimized
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 02-27-2014 at 09:48. Reason: --
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 02-27-2014 , 19:23   Re: [Help] Block Kill Frag ?
Reply With Quote #8

I see... Thanks for the suggest
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
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 14:53.


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