AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   The last players of the 2 teams ! (https://forums.alliedmods.net/showthread.php?t=194834)

Cool 08-31-2012 17:48

The last players of the 2 teams !
 
Hi,

I need a code in which the last remaining player of both teams to receive a different power set by me.

Thank you !

Sorry for my english.

UnknownMP 08-31-2012 17:49

Re: The last players of the 2 teams !
 
What you mean with power?
Do you want a command or what?

ConnorMcLeod 08-31-2012 17:54

Re: The last players of the 2 teams !
 
Imagine there is 1 T and 1 CT left, T has planted the bomb, CT kill T, so CT is the last player, but then he doesn't have the time to defuse the bomb, so round is won by Ts, you still want to give a power to the CT ?

Cool 08-31-2012 17:55

Re: The last players of the 2 teams !
 
No, I have a source but this source doesn't work. This plugin is for Furien Mode.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike> 
#include <fun>

#pragma semicolon 1;

public plugin_init() 
{

    
register_plugin("Kage vs Psycho""1.0""danuzzk"); 
    
register_event("DeathMsg""kage_vs_psycho""a");
    

}

public 
kage_vs_psycho() 
{

    new 
maxplayers get_maxplayers();

    new 
af[32], f[32], antifurien;
    new 
team;

    for (new 
1<= maxplayersi++)
    {
        if (!
is_user_connected(i) || !is_user_alive(i))
            return -
1;
    

        
team get_user_team(i);
    
        if(
team == 1)
        {
            
f[furien++] = i;
        }
    
        else 
    
        if(
team == 2)
        {
            
af[anti++] = i;
        }
        
        
        if (
furien == 1)
        { 
            
set_user_health(f[0], 300);
            
set_user_armor(f[0], 300);

            
set_user_rendering(f[0], kRenderFxGlowShell000kRenderTransAlpha0);

            
client_print(0print_chat "The last player from t is now Psycho - He has 300HP, 300AP");
        }
        
        if (
anti == 1)
        {
            
set_user_health(af[0], 300);
            
set_user_armor(af[0], 300);

            
give_item(af[0], "item_assaultsuit");
            
give_item(af[0], "item_thighpack");

            
set_user_rendering(af[0], kRenderFxGlowShell000kRenderTransAlpha0);

            
client_print(0print_chat "The last player from ct is now Kage - He has 300HP, 300AP ");
        }
        
    }
    
    return 
1;



UnknownMP 08-31-2012 18:14

Re: The last players of the 2 teams !
 
Here you go!
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike> 
#include <fun>
#include <furien>

#pragma semicolon 1;

public plugin_init() 
{

    
register_plugin("Kage vs Psycho""1.0""danuzzk"); 
    
register_event("DeathMsg""kage_vs_psycho""a");
    

}

public 
kage_vs_psycho(id
{
    
    new 
players[32], numplayer;
    
get_playersplayersnum"a" );
    for( new 
0numi++ )
    {
        
player players[i];
        switch( 
furien_get_user_teamplayer ) )
        {
            case 
Furien:
            {
                
set_user_health(player300);
                
set_user_armor(player300);
                
set_user_rendering(playerkRenderFxGlowShell000kRenderTransAlpha0);
                
client_print(0print_chat "The last player from the furien team is now Psycho - He has primit 300HP, 300AP");
            }
            case 
AntiFurien:
            {
                
set_user_health(player300);
                
set_user_armor(player300);
                
give_item(player"item_assaultsuit");
                
give_item(player"item_thighpack");
                
set_user_rendering(playerkRenderFxGlowShell000kRenderTransAlpha0);
                
client_print(0print_chat "The last player from ct is now Kage - He has 300HP, 300AP ");
            }
        }
        }



UnknownMP 08-31-2012 18:24

Re: The last players of the 2 teams !
 
Does it work?

ConnorMcLeod 08-31-2012 18:40

Re: The last players of the 2 teams !
 
He never asked the plugin for a special mod.

Cool 09-01-2012 06:00

Re: The last players of the 2 teams !
 
Doesn't work. I don't know why but it don't load.

UnknownMP 09-01-2012 06:35

Re: The last players of the 2 teams !
 
Quote:

Originally Posted by Cool (Post 1788110)
This plugin is for Furien Mode.

The teams in furien are alternated so you need the furien.inc to compile it and you must have all furien plugins running.


All times are GMT -4. The time now is 08:11.

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