Raised This Month: $46 Target: $400
 11% 

Modif Plugin


  
 
 
Thread Tools Display Modes
Author Message
Oen
Junior Member
Join Date: Apr 2004
Old 07-03-2004 , 21:34   Modif Plugin
#1

lut

J' aimerai savoir si quelkun pouvai modifié le plugin ci dessou:

il est pas tres pratique il permet de choisir pluseur mode d' ecoute

le probleme c' est qu'il faut entré la commande dans le userconfig.cfg de l' admin

Ce qui serai bien c' est de mettre des cvar afin de choisir quel mode d' ecoute on veu a tout moment du jeu et pour d' autre joueur

genre :
"amx_listen Player 1" pour l' ecoute normal

"amx_listen Player 2" pour entendre tout le monde

"amx_listen Player 3" pour parler a tout le monde

"amx_listen Player 4" pour entendre & parler a tout le monde

Quote:

//BioCom by Bionic. lets admins have 4 different voiceCom-modes. Vexd_Utilities required.
#include <amxmodx>
#include <Vexd_Utilities>

new voicemode[1];
new strtemp[64];
new strvoiceinfo[4][] = {"normal","speak to all","listen to all", "listen and speak to all" };
new i;

public client_infochanged(id)
{
setspeakmode(id);
return PLUGIN_CONTINUE;
}

public client_connect(id)
{
setspeakmode(id);
return PLUGIN_CONTINUE;
}

public getspeakmode(id)
{
get_user_info(id,"biocomode",voicemode,1);
format(strtemp, 64, "Voicecom-mode: %s",strvoiceinfo[ str_to_num(voicemode[0])%4 ] );
client_print(id,print_center,strtemp);
client_print(id,print_console,strtemp);

return PLUGIN_HANDLED;
}

public changespeakmode(id)
{
if ((get_user_flags(id) & ADMIN_CHAT))
{
get_user_info(id,"biocomode",voicemode,1);
i=str_to_num(voicemode[0]);
num_to_str(++i%4,voicemode[0],1);

set_user_info(id,"biocomode",voicemode[0]);
setspeakmode(id);

format(strtemp, 64, "Your voicecom is set to %s",strvoiceinfo[ str_to_num(voicemode[0])%4 ] );
client_print(id,print_center,strtemp);
client_print(id,print_console,strtemp);
} else
{
client_print(id,print_console,"Hey, you are not an admin, are you? :)");
}
return PLUGIN_HANDLED;
}

public setspeakmode(id)
{
if ((get_user_flags(id) & ADMIN_CHAT))
{
get_user_info(id,"biocomode",voicemode,1);
if(voicemode[0]!='0' &&
voicemode[0]!='1' &&
voicemode[0]!='2' &&
voicemode[0]!='3'
)
{
voicemode[0]='2';
set_user_info(id,"biocomode",voicemode[0]);
}

if(voicemode[0]=='0') SetSpeak(id, SPEAK_NORMAL);
if(voicemode[0]=='1') SetSpeak(id, SPEAK_ALL);
if(voicemode[0]=='2') SetSpeak(id, SPEAK_LISTENALL);
if(voicemode[0]=='3') SetSpeak(id, SPEAK_ALL | SPEAK_LISTENALL);
}
}

public plugin_init()
{
register_plugin("BioCom","0.9.6-1.1","Bionic");
register_clcmd("amx_changespeakmode","changes peakmode",ADMIN_CHAT, "Alter your VoiceCom-mode");
register_clcmd("amx_getspeakmode","getspeakmo de",ADMIN_CHAT, "Get your current VoiceCom-mode");

return PLUGIN_CONTINUE;
}


Oen is offline
 


Thread Tools
Display Modes

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:09.


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