Ein neues Thema erstellen  Auf das Thema antworten  [ 6 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: "say me" PlugIn gesucht
BeitragVerfasst: 03.09.2002, 15:25 

Registriert: 25.06.2002, 11:44
Beiträge: 16
Hallo,
vor einiger Zeit gab es mal ein PlugIn welches dem Spieler ermöglichte seine say ausgabe etwas zu verändern. Und zwar dadurch das das erste Wort me war.
Wenn der Player "Otto" die Eingabe "say me den Server gut" getätigt hatte, kam folgende Message auf den Bildschirm:

Otto findet den Server gut

( natürlich ohne Farben - sah aus wie bei admin_ssay )

Kennt einer das PlugIn ? Ich hab schon überall gesucht.

Danke schonmal


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 04.09.2002, 00:31 

Registriert: 09.01.2002, 19:10
Beiträge: 323
Wohnort: Weltstadt "Brech"
vermutlich meinst du eher:

say me findet den Server gut

Otto findet den Server gut


Ich habs selber noch nicht gesehn ....
Aber schlecht wärs net !

_________________
D@T@
Rechtschreibfähler könnt ihr behalten, mit Kassenbon zurückgeben oder meinen Deutsch-Lehrer dafür verantwortlich machen !!!


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 04.09.2002, 12:31 

Registriert: 25.06.2002, 11:44
Beiträge: 16
Genau so ist es auch. Ich habe das PlugIn gefunden - ist echt witzig.
Wer das Ding mal einfach sehen will: 62.4.67.162:27015

IRC type action plugin

von http://www.adminmod.org/ascript/plugin.php#3698587941


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 05.09.2002, 00:30 

Registriert: 09.01.2002, 19:10
Beiträge: 323
Wohnort: Weltstadt "Brech"
Ich würde gerne aus dem Plugin eine Funktion rausnehemn ...
und zwar das man das ganze nur mit 'me' und nicht zusätzlich noch mit '/me' aktivieren kann !
Ich habs schon versucht ... aber dann lief es nimmer richtig !
Code:
/* This plugin allows users to do IRC type actions by typing me first. */
/* Special thanks to Sank for really teaching me how to do this, and yensid for some ideas =) */
/* Thanks to Admin Mod team for making an EXCELLENT utility for us server admins. */
/* $Id: plugin_ircaction_cs.sma,v 1.0 2001/04/13 greider Exp $ */

#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.0";

ProcessAction(User[],UserIndex,Data[])
{
	new i;
	new iTeam;
	new maxplayers = maxplayercount();
	new Name[MAX_NAME_LENGTH];
	new SessionID;
	new WONID;
	new UserDead;
	new ListenDead;
	new Text[MAX_TEXT_LENGTH];

	snprintf(Text, MAX_TEXT_LENGTH, "%s %s", User, Data);

	if (playerinfo(UserIndex, Name, MAX_NAME_LENGTH, SessionID, WONID, iTeam, UserDead))
	{
		for(i=1; i<=maxplayers; i++)
		{
			if(playerinfo(i, Name, MAX_NAME_LENGTH, SessionID, WONID, iTeam, ListenDead))
			{
				/* Find out if target's status is same as User, if so, print it. */
				if (UserDead == ListenDead)
				{
					messageex(Name, Text, print_chat);
				}
			}
		}
	}
}

public HandleSay(HLCommand, HLData, HLUserName, UserIndex) 
{
	new i;
	new Length;
	new User[MAX_NAME_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new strAction[MAX_DATA_LENGTH];

	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_DATA_LENGTH);
	strstripquotes(Data);
	Length = strlen(Data);
	if (strmatch(Data,"me ",strlen("me "))==1)
	{
		/* we need to strip out 'me ' (3 characters */
		for(i=3;i<Length+1;i++)
			strAction[i-3] = Data[i];
		strAction[i-3] = NULL_CHAR;
		ProcessAction(User, UserIndex, strAction);
		return PLUGIN_HANDLED;
	}
	else if (strmatch(Data,"/me ",strlen("/me "))==1)
	{
		/* we need to strip out '/me ' (4 characters */
		for(i=4;i<Length+1;i++)
			strAction[i-4] = Data[i];
		strAction[i-3] = NULL_CHAR;
		ProcessAction(User, UserIndex, strAction);
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public plugin_init()
{
	plugin_registerinfo("IRC Action Plugin","Converts say to IRC type actions by typing me or /me <action>.",STRING_VERSION);
	plugin_registercmd("say","HandleSay",ACCESS_ALL);
	plugin_registerhelp("say",ACCESS_ALL,"say me <action>: Converts say to IRC type actions.");
	plugin_registerhelp("say",ACCESS_ALL,"say /me <action>: Converts say to IRC type actions.");

	return PLUGIN_CONTINUE;
}
bei folgendem bin ich mir ziemlich sicher dass man das einfach so rausnehemn kann ...
  • plugin_registerinfo("IRC Action Plugin","Converts say to IRC type actions by typing me or /me <action>.",STRING_VERSION);
    plugin_registerhelp("say",ACCESS_ALL,"say /me <action>: Converts say to IRC type actions.");
(das rote)
danke im voraus für die hilfe !

_________________
D@T@
Rechtschreibfähler könnt ihr behalten, mit Kassenbon zurückgeben oder meinen Deutsch-Lehrer dafür verantwortlich machen !!!


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 05.09.2002, 03:22 

Registriert: 25.06.2002, 11:44
Beiträge: 16
Guten Morgen ( eher gute Nacht ),

um das PlugIn dementsprechend abzuändern, musst du den rot markierten Teil löschen. Dann sollte es funktionieren.
Den grünen Kram kannst Du denke ich drin lassen, kannst ihn aber auch löschen ( was ebenfalls keine Probs machen sollte ).

Gruß Viper_de

Aber mal eine Frage, waum brauchst Du das ?
Zitat:
/* This plugin allows users to do IRC type actions by typing me first. */
/* Special thanks to Sank for really teaching me how to do this, and yensid for some ideas =) */
/* Thanks to Admin Mod team for making an EXCELLENT utility for us server admins. */
/* $Id: plugin_ircaction_cs.sma,v 1.0 2001/04/13 greider Exp $ */

#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.0";

ProcessAction(User[],UserIndex,Data[])
{
new i;
new iTeam;
new maxplayers = maxplayercount();
new Name[MAX_NAME_LENGTH];
new SessionID;
new WONID;
new UserDead;
new ListenDead;
new Text[MAX_TEXT_LENGTH];

snprintf(Text, MAX_TEXT_LENGTH, "%s %s", User, Data);

if (playerinfo(UserIndex, Name, MAX_NAME_LENGTH, SessionID, WONID, iTeam, UserDead))
{
for(i=1; i<=maxplayers; i++)
{
if(playerinfo(i, Name, MAX_NAME_LENGTH, SessionID, WONID, iTeam, ListenDead))
{
/* Find out if target's status is same as User, if so, print it. */
if (UserDead == ListenDead)
{
messageex(Name, Text, print_chat);
}
}
}
}
}

public HandleSay(HLCommand, HLData, HLUserName, UserIndex)
{
new i;
new Length;
new User[MAX_NAME_LENGTH];
new Data[MAX_DATA_LENGTH];
new strAction[MAX_DATA_LENGTH];

convert_string(HLData,Data,MAX_DATA_LENGTH);
convert_string(HLUserName,User,MAX_DATA_LENGTH);
strstripquotes(Data);
Length = strlen(Data);
if (strmatch(Data,"me ",strlen("me "))==1)
{
/* we need to strip out 'me ' (3 characters */
for(i=3;i<Length+1;i++)
strAction[i-3] = Data;
strAction[i-3] = NULL_CHAR;
ProcessAction(User, UserIndex, strAction);
return PLUGIN_HANDLED;
}
else if (strmatch(Data,"/me ",strlen("/me "))==1)
{
/* we need to strip out '/me ' (4 characters */
for(i=4;i<Length+1;i++)
strAction[i-4] = Data;
strAction[i-3] = NULL_CHAR;
ProcessAction(User, UserIndex, strAction);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}

public plugin_init()
{
plugin_registerinfo("IRC Action Plugin","Converts say to IRC type actions by typing me or /me <action>.",STRING_VERSION);
plugin_registercmd("say","HandleSay",ACCESS_ALL);
plugin_registerhelp("say",ACCESS_ALL,"say me <action>: Converts say to IRC type actions.");
plugin_registerhelp("say",ACCESS_ALL,"say /me <action>: Converts say to IRC type actions.");

return PLUGIN_CONTINUE;
}


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 07.09.2002, 19:21 

Registriert: 09.01.2002, 19:10
Beiträge: 323
Wohnort: Weltstadt "Brech"
das plugin ... einfach so, kann man sich besser ausdrücken :wink:

die änderung ... weil statsme bei mir den gleichen befehl hat


also BIG THX !!!

_________________
D@T@
Rechtschreibfähler könnt ihr behalten, mit Kassenbon zurückgeben oder meinen Deutsch-Lehrer dafür verantwortlich machen !!!


Nach oben
   
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen  Auf das Thema antworten  [ 6 Beiträge ] 


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Powered by phpBB® Forum Software © phpBB Limited
Deutsche Übersetzung durch phpBB.de
Original Design von "[ Half-Life Admin Mod © Alfred Reynolds 2000-2003 ] - [ site design by Jägermeister ]"