Raised This Month: $ Target: $400
 0% 

survivor @ roudend.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-15-2009 , 05:04   survivor @ roudend.
Reply With Quote #1

http://forums.alliedmods.net/search....archid=4601817

before you say SEARCH see the link.

how to get the round survivor?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-15-2009 , 05:43   Re: survivor @ roudend.
Reply With Quote #2

What?
__________________
xPaw is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-15-2009 , 05:57   Re: survivor @ roudend.
Reply With Quote #3

i want to know who survived the round.
& print :

%s has survived the round!
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-15-2009 , 05:59   Re: survivor @ roudend.
Reply With Quote #4

Who you mean under survivor
__________________
xPaw is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-15-2009 , 06:17   Re: survivor @ roudend.
Reply With Quote #5

which players are alive & not dead. do i have to just check which players are alive @ roundend or is there a better way to do this?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 10-15-2009 , 10:36   Re: survivor @ roudend.
Reply With Quote #6

the way i would do it would be to hook round end, create a loop though to get_playersnum(), and check is_user_alive()

allthough there might be more than 1 survivor so it could cause a few problems
__________________
minimiller is offline
Send a message via MSN to minimiller
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-15-2009 , 10:52   Re: survivor @ roudend.
Reply With Quote #7

i had the same idea but how you say, this can be a mini problem.

i want to check survivor/s @ round end and set 1 T to ct for new round ( if there are < 10 players) or set 2 Ts to CT when there are more then 10 players.

thats what i wanted to do :

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("round_end"2"1=Round_End")
}
public 
round_end()
{
    new 
survived_players
    
new p_playernum;
    
p_playernum get_playersnum(1);
    
    for ( new 
iiNumi++ )
    {
        if(
is_user_alive(i))
        {
            
survived_players++
        }
    }
    if(
survived_players >= && p_playernum 10)
    {
        
//set 1 T to CT
    
}
    else if(
survived_players >= && p_playernum 10)
    {
        
//set 2 T's to CT
    
}

i think this code is correct but i want to know if is there a better way to do this or not? or maybe is my code not correct ?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 10-15-2009 , 12:54   Re: survivor @ roudend.
Reply With Quote #8

You used magic to create iNum?

PHP Code:
new players[32], pnumplayer;
get_players(playerspnum);

for( new 
ii<pnumi++ )
{
    
player players[i]
    
// then do ur stuff

__________________
I am out of order!
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-15-2009 , 12:58   Re: survivor @ roudend.
Reply With Quote #9

PHP Code:
new iPlayers32 ], iSurvivedPlayers;
get_playersiPlayersiSurvivedPlayers"a" );

// iSurvivedPlayers = alive count 
__________________
xPaw is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 10-15-2009 , 13:02   Re: survivor @ roudend.
Reply With Quote #10

Quote:
Originally Posted by xPaw View Post
PHP Code:
new iPlayers32 ], iSurvivedPlayers;
get_playersiPlayersiSurvivedPlayers"a" );

// iSurvivedPlayers = alive count 
he only wants terror survivors

PHP Code:
new iPlayers32 ], iSurvivedPlayers
get_playersiPlayersiSurvivedPlayers"ae""TERRORIST"); 

// iSurvivedPlayers = alive count (terrorists) 
__________________
I am out of order!
grimvh2 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 22:43.


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