Raised This Month: $ Target: $400
 0% 

[ Solved ] Last in team (Ct & T)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-27-2012 , 10:34   [ Solved ] Last in team (Ct & T)
Reply With Quote #1

I do that :
Code:
#include < amxmodx > public plugin_init( ) {     register_plugin( "Last In Team" , "1.0" , "Aooka" );         register_event( "DeathMsg" , "Ev_DeathMsg" , "a" ); } public Ev_DeathMsg( ) {     new iPlrCt[ 32 ] , iPlrTe[ 32 ];     new iNumCt , iNumTe;         get_players( iPlrCt , iNumCt , "aeh" , "CT" );         if( iNumCt == 1 )     {         client_print( 0 , print_center , "Il ne reste plus qu'un Ct" );     }         get_players( iPlrTe , iNumTe , "aeh" , "TERRORIST" );         if( iNumTe == 1 )     {         client_print( 0 , print_center , "Il ne reste plus qu'un Terro" );     } }

My question is very simple : Is theire an other way to do that ?
__________________
Pawn ? Useless

Last edited by Aooka; 06-27-2012 at 14:26.
Aooka is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-27-2012 , 11:35   Re: [REQ] Last in team (Ct & T)
Reply With Quote #2

Yes, you only need one player list array and one player count variable. Just reuse them.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 06-27-2012 , 12:35   Re: [REQ] Last in team (Ct & T)
Reply With Quote #3

Or using Ham_Killed.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-27-2012 , 12:41   Re: [REQ] Last in team (Ct & T)
Reply With Quote #4

Yes but if I do that i've to include hamsandwich but yes it's work fine Thanks !
__________________
Pawn ? Useless
Aooka is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 06-27-2012 , 13:11   Re: [REQ] Last in team (Ct & T)
Reply With Quote #5

Quote:
Originally Posted by Aooka View Post
Yes but if I do that i've to include hamsandwich but yes it's work fine Thanks !
And what's the problem to use other module?
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-27-2012 , 14:12   Re: [REQ] Last in team (Ct & T)
Reply With Quote #6

It's not a really a problem.
it's just an overload for your code.

It's inserts in your code all that the include contains so it's not the better way.
__________________
Pawn ? Useless
Aooka is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-27-2012 , 14:18   Re: [REQ] Last in team (Ct & T)
Reply With Quote #7

No it's not an overload and it includes only that you have used in the code. Also there are some occasions when player dies without sending a death message.
__________________

Last edited by <VeCo>; 06-27-2012 at 14:18.
<VeCo> is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-27-2012 , 14:21   Re: [REQ] Last in team (Ct & T)
Reply With Quote #8

So if i've a plugin with 20 include it's the same as if i've only 4 ? I did not know , so thanks ! :d

Yes i test it and they are this problem :/ I check it this evening.
__________________
Pawn ? Useless
Aooka is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-27-2012 , 14:25   Re: [REQ] Last in team (Ct & T)
Reply With Quote #9

And btw:
PHP Code:
public Ev_DeathMsg( const id 

It doesn't have an index, because the event is global (it isn't sent only to one specific player).
__________________

Last edited by <VeCo>; 06-27-2012 at 14:25.
<VeCo> is offline
Aooka
Veteran Member
Join Date: Aug 2011
Location: Villeurbanne
Old 06-27-2012 , 14:26   Re: [REQ] Last in team (Ct & T)
Reply With Quote #10

Oh yes i edit that i just ... forget it . Thx
__________________
Pawn ? Useless
Aooka 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 06:10.


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