Raised This Month: $ Target: $400
 0% 

last players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 06-30-2014 , 16:30   Re: last players
Reply With Quote #1

i think this will works but im not sure....
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Play sound" #define VERSION "1.0" #define AUTHOR "Porta0123" new bool:are_2players = false public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event( "DeathMsg" , "DeathMsgEvent" , "a" ); } public DeathMsgEvent() {     new pnum     new players[32], tempid;     new count = 0         get_players(players, pnum);         for(new i=0; i < pnum; i++)     {         tempid = players[i];                 if(is_user_alive(tempid))         {         count++         }     }         if(are_2players == true)     {         are_2players = false         //here the sounds etc...     }       if(count == 2)     dosound() } public dosound() {     set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)     show_hudmessage(0, "1 vs 1")     are_2players = true         //here you can add one sound like "you are alone" or something... }

Last edited by Porta0123; 06-30-2014 at 16:37.
Porta0123 is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 06-30-2014 , 16:55   Re: last players
Reply With Quote #2

Code:
#include <amxmodx> public plugin_init() {     register_plugin("Last 2 players", "1.0", "Freezo")         register_event( "DeathMsg" , "DeathMsgEvent" , "a" ); } public DeathMsgEvent() {     new players[ 32 ], iNum       get_players( players, iNum, "ach" )           if( iNum == 2 )     {         for ( new i=0,id ; i < iNum ; i++ )         {             id = players[ i ]             // Do your stuf         }     } }

Last edited by Freezo Begin; 06-30-2014 at 16:55.
Freezo Begin 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 21:11.


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