Phr.Idle.Ro
Doriti să reactionati la acest mesaj? Creati un cont în câteva clickuri sau conectati-vă pentru a continua.

Ultimate Connect Leave

In jos

Ultimate Connect Leave Empty Ultimate Connect Leave

Mesaj Scris de Rapidistu Sam 12 Apr 2008, 20:46

Descreire: Cand se conecteaza cineva pe server va canta o melodie (Care o poti tu pune/edita) + Mesaj ExtraEfect.
Am facut doar .sma la el dar va explic cum trebuie facut cu el (pt cei care nu stiu)
Fisierul .sma
-> -> -> -> -> -> -> -> -> -> -> -> ->
#include <amxmodx>



#define PLUGIN "Connect Announce"

#define VERSION "0.3b"

#define AUTHOR "ChaoS"



new g_iMsgSayText, g_szSoundFile[] = "misc/beback.wav";



public plugin_init()

{

register_plugin(PLUGIN, VERSION, AUTHOR);

register_cvar("announce_module","2");

register_cvar("announce_sound","1");

g_iMsgSayText = get_user_msgid("SayText");

}



/*

announce_module <0|1|2|3>

0 - Off

1 - Connect announce only

2 - Disconnect announce only

3 - Both



announce_sound <0|1>

0 - No sound

1 - Sound

*/



public plugin_precache()

{

precache_sound(g_szSoundFile);

}



public client_disconnect(id)

{

new iMode = get_cvar_num("announce_module");



if(is_user_bot(id) || iMode == 0 || iMode == 1)

return PLUGIN_CONTINUE;



new szUserName[33];

get_user_name(id, szUserName, 32);



new szAuthID[33];

get_user_authid(id , szAuthID , 32);



new iPlayers[32], iNum, i;

get_players(iPlayers, iNum);



for(i = 0; i <= iNum; i++)

{

new x = iPlayers[i];



if(!is_user_connected(x) || is_user_bot(x)) continue;



if(get_cvar_num("announce_sound") == 1)

client_cmd(x, "spk %s", g_szSoundFile);



new szMessage[164];

format(szMessage, 163, "^x04* %s ^x01s-a deconectat !", szUserName);



message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );

write_byte ( 3 );

write_string( szMessage );

message_end ();

}



return PLUGIN_CONTINUE;

}


Instalare:
Textul de mai sus il puneti intr-un fisier Notepad De preferinta il numiti ultimate_connect_leave

Acest Fisier .sma I ducem in cstrike/addons/amxmodx/scripting Si il punem peste Compile

Mergem in cstrike/addons/amxmodx/scripting/compiled si gasim Fisierul pe care l-am COMPILAT (ultimate_connect_leave) Dam Copy.

Mergem in cstrike/addons/amxmodx/plugins si dam Paste.

Mergem in cstrike/addons/amxmodx/configs/plugins.ini Si adaugam Linia Umatoare:
ultimate_connect_leave.amxx

-----Daca ai urmat instructiunile cum trebuie iti v-a merge-----
Rapidistu
Rapidistu
INFERNO DETINATOR
INFERNO DETINATOR

masculin
Numarul mesajelor : 690
Varsta : 33
Localizare : Videle
VA PLACE SV NOSTRU : Da
STEAM ON/OFF : ON
Data de inscriere : 28/03/2008

InfernoCs
InfernoCS:

https://phr-zone.forumgratuit.ro

Sus In jos

Sus

- Subiecte similare

 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum