Raised This Month: $ Target: $400
 0% 

Friendlyfire Score Decrease Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 06-29-2012 , 15:22   Friendlyfire Score Decrease Help
Reply With Quote #1

Hello,

Is there any plugin/function that's disabling the -1 decrease in score when teamkilling?

Thanks
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu

Last edited by MokeN; 06-29-2012 at 15:23.
MokeN is offline
Send a message via Skype™ to MokeN
MyPc
Senior Member
Join Date: Sep 2011
Old 06-29-2012 , 15:35   Re: Friendlyfire Score Decrease Help
Reply With Quote #2

Quote:
Originally Posted by MokeN View Post
Hello,

Is there any plugin/function that's disabling the -1 decrease in score when teamkilling?

Thanks
Try this:
Code:
#include <amxmodx> #include <hamsandwich> #include <fun> public plugin_init() {     RegisterHam( Ham_Killed, "player", "function", 1 ); } public function(this, idattacker, shouldgib) {     if( get_user_team( this ) == get_user_team( idattacker ) )     {         set_user_frags( idattacker, get_user_frags( idattacker ) + 1 );     } }
MyPc is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 06-29-2012 , 16:05   Re: Friendlyfire Score Decrease Help
Reply With Quote #3

Thanks, perfect!

Another thing, i made an gamemenu for jailbreak and i'm having troubles to give the CTs godmode on specific games.
The fm_set_user_godmode, set_user_godmode didn't work and the Ham_TakeDamage_Pre bugged alot :s

Help?

Example Game Action:
PHP Code:
public ZombieBombsGame(id)
{
    
g_iCurrentGame GAME_ZMBOMBS
    
    
new iPlayers[32]
    new 
iNum
    
new id
 
    get_players
iPlayersiNum )
 
    for( new 
0iNumi++ )
    {
        
id iPlayers[i]
        if( !
is_user_aliveid ) )
        {
            continue;
        }
       
        
set_hudmessage 2556464, -1.00.3500.15.00.10.1, -
        
show_hudmessage 0"[SG]: ZombieBomb Game Started!")
       
        
strip_user_weaponsid )
       
        if (
cs_get_user_team(id) == CS_TEAM_CT)
        {
    
give_item(id"weapon_knife")
    
set_user_godmode(id1)
    
           
        }
       
        if (
cs_get_user_team(id) == CS_TEAM_T)
        {
            
give_item(id"weapon_hegrenade")
            
cs_set_user_bpammoidCSW_HEGRENADE200 )
        }
       
    }

__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-29-2012 , 16:38   Re: Friendlyfire Score Decrease Help
Reply With Quote #4

You have 2 'id' params.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 06-29-2012 , 17:55   Re: Friendlyfire Score Decrease Help
Reply With Quote #5

u mean i got (id) and new id?
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 06-29-2012 , 19:29   Re: Friendlyfire Score Decrease Help
Reply With Quote #6

So probably it should be: D

PHP Code:
public ZombieBombsGame(id) {
    
g_iCurrentGame GAME_ZMBOMBS

    
for(new 1<= 33i++) {
        if(!
is_user_connected(i) || !is_user_alive(i))
            return 
PLUGIN_CONTINUE

        set_hudmessage
(2556464, -1.00.3500.15.00.10.1, -1)
        
show_hudmessage(0"[SG]: ZombieBomb Game Started!")

        
strip_user_weapons(i)
        if(
cs_get_user_team(i) == CS_TEAM_CT) {
            
give_item(i"weapon_knife")
            
set_user_godmode(i1)
        }
        if(
cs_get_user_team(id) == CS_TEAM_T) {
            
give_item(i"weapon_hegrenade")
            
cs_set_user_bpammo(idCSW_HEGRENADE200)
        }
    }
    return 
PLUGIN_CONTINUE

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-30-2012 , 05:48   Re: Friendlyfire Score Decrease Help
Reply With Quote #7

Quote:
Originally Posted by OnePL View Post
So probably it should be: D

PHP Code:
public ZombieBombsGame(id) {
    
g_iCurrentGame GAME_ZMBOMBS

    
for(new 1<= 33i++) {
        if(!
is_user_connected(i) || !is_user_alive(i))
            return 
PLUGIN_CONTINUE

        set_hudmessage
(2556464, -1.00.3500.15.00.10.1, -1)
        
show_hudmessage(0"[SG]: ZombieBomb Game Started!")

        
strip_user_weapons(i)
        if(
cs_get_user_team(i) == CS_TEAM_CT) {
            
give_item(i"weapon_knife")
            
set_user_godmode(i1)
        }
        if(
cs_get_user_team(id) == CS_TEAM_T) {
            
give_item(i"weapon_hegrenade")
            
cs_set_user_bpammo(idCSW_HEGRENADE200)
        }
    }
    return 
PLUGIN_CONTINUE

That way of looping is poor, always prefer the use of get_players.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 15:20.


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