Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- new const CHAT_TAG[] = "[FURIEN]"
- new const BANI = 5000
- public plugin_init() register_event( "DeathMsg", "Event_Death", "a" )
- public Event_Death()
- {
- if(CountPlayers(1)==1)
- {
- new ter=GetRemainingPlayerId(1)
- cs_set_user_money(ter,cs_get_user_money(ter)+BANI,1)
- print_cc(0,"^4%s^1 -^4 %s^1 - este ultimul^4 FURIEN^1 si primeste (^4%d$^1) BONUS!",CHAT_TAG,get_name(ter),BANI)
- }
- if(CountPlayers(2)==1)
- {
- new ct=GetRemainingPlayerId(2)
- cs_set_user_money(ct,cs_get_user_money(ct)+BANI,1)
- print_cc(0,"^4%s^1 -^4 %s^1 - este ultimul^4 ANTI-FURIEN^1 si primeste (^4%d$^1) BONUS!",CHAT_TAG,get_name(ct),BANI)
- }
- }
- stock CountPlayers( const Team )
- {
- new iPlayers[ 32 ],iPlayersNum,iPlayersCount;
- get_players( iPlayers, iPlayersNum, "ach" );
- for( new i = 0; i < iPlayersNum; i++ )
- {
- if( Team == 1 ) if( get_user_team( iPlayers[ i ] ) == 1 ) iPlayersCount++;
- else if( Team == 2 ) if( get_user_team( iPlayers[ i ] ) == 2 ) iPlayersCount++;
- }
- return iPlayersCount;
- }
- stock GetRemainingPlayerId( const Team )
- {
- new iPlayers[ 32 ],iPlayersNum,iPlayerId;
- get_players( iPlayers, iPlayersNum, "ach" );
- for( new i = 0; i < iPlayersNum; i++ )
- {
- if( Team == 1 ) if( get_user_team( iPlayers[ i ] ) == 1 ) iPlayerId = iPlayers[ i ];
- else if( Team == 2 ) if( get_user_team( iPlayers[ i ] ) == 2 ) iPlayerId = iPlayers[ i ];
- }
- return iPlayerId;
- }
- stock get_name(const id)
- {
- new name[32]
- get_user_name(id,name,charsmax(name))
- return name
- }
- print_cc(id, fmt[], any:...)
- {
- static saytext = 0, fake_user;
- if (!saytext)
- {
- saytext = get_user_msgid("SayText");
- fake_user = get_maxplayers() + 1;
- }
- new msg[192];
- vformat(msg, charsmax(msg), fmt, 3)
- message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, saytext, _, id);
- write_byte(id ? id : fake_user);
- write_string(msg);
- message_end();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement