This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Open the mod's server.dll in a hex editor / Total commander's lister /
whatever and search for SayText or TextMsg or any other message name you
know.

AmmoDenied ReloadEffect HintText BarTime RequestState VoiceMask
CloseCaption VGUIMenu Fade Shake ItemPickup GameTitle ResetHUD HudMsg
TextMsg SayText HudText Train Geiger

There, you have to count from the end: Geiger is 0, Train is 1, HudText
is 2, SayText is 3, TextMsg is 4, ...

I e-mail Alfred about GetUserMessageInfo crashing some time ago, it is
hopefully being resolved at the moment.
If you want to hack it, you can do something like this:

Change spew output function to your function, which only throws an
exception of your type
Iterate and catch the exception
Change spew output function back

Have fun.

Pavol Marko
http://www.sourcemod.net/

Frank Weima schrieb:

>Is there any website which displays all those filters/usermessages?
>Lance told me: "&Filter, 10" // 10 = shake.
>Is there a website with some other usermessages/filters? :)
>
>
>Thnx,
>Frank
>
>----- Original Message -----
>From: "Frank Frieswijk" <[EMAIL PROTECTED]>
>To: <[email protected]>
>Sent: Friday, February 18, 2005 1:55 PM
>Subject: Re: [hlcoders] Send user message
>
>
>
>
>>You rule, thanx ;-)
>>- Frank
>>--
>>
>>
>>
>>Citeren Lance Vorgin <[EMAIL PROTECTED]>:
>>
>>] Assuming you're starting from the empty server plugin, first include
>>] /src/tier1/bitbuf.cpp into your project, then add this somewhere
>>]
>>] #include "IRecipientFilter.h"
>>] #include "bitbuf.h"
>>] #include "shake.h"
>>]
>>] class CNewRecipientFilter : public IRecipientFilter {
>>] private:
>>] CUtlVector<int> m_vRecipients;
>>]
>>] public:
>>] virtual bool IsReliable() const { return true; }
>>] virtual bool IsInitMessage() const { return false; }
>>]
>>] virtual int GetRecipientCount() const { return m_vRecipients.Count(); }
>>] virtual int GetRecipientIndex(int iSlot) const { return
>>] m_vRecipients[iSlot]; }
>>]
>>] bool Add(edict_t* pEdict){ if(!pEdict || pEdict->IsFree()) return
>>] false; return Add(engine->IndexOfEdict(pEdict)); }
>>] bool Add(int iIndex){ if(iIndex <= 0) return false;
>>] m_vRecipients.AddToHead(iIndex); return true; }
>>] };
>>]
>>]
>>] bool Shake(edict_t* pEdict){
>>] if(!pEdict || pEdict->IsFree())
>>] return false;
>>]
>>] CNewRecipientFilter Filter;
>>]
>>] if(!Filter.Add(pEdict))
>>] return false;
>>]
>>] bf_write* pBitBuf = engine->UserMessageBegin(&Filter, 10); //10 =
>>] shake in css and hl2dm atm - use engine->GetUserMessageInfo to
>>] enumerate
>>]
>>] if(!pBitBuf)
>>] return false;
>>]
>>] pBitBuf->WriteByte(SHAKE_START); // shake command (SHAKE_START,
>>] STOP, FREQUENCY, AMPLITUDE)
>>] pBitBuf->WriteFloat(25); // shake magnitude/amplitude
>>] pBitBuf->WriteFloat(150.0); // shake noise frequency
>>] pBitBuf->WriteFloat(2.0); // shake lasts this long
>>]
>>] engine->MessageEnd();
>>]
>>] engine->ClientPrintf(pEdict, "Shake, my minion!\n");
>>]
>>] return true;
>>] }
>>]
>>] Then just rig up down in ClientCommand
>>]
>>] else if(FStrEq(pcmd, "shakememofo")){
>>] Shake(pEntity);
>>]
>>] return PLUGIN_STOP;
>>] }
>>]
>>] _______________________________________________
>>] To unsubscribe, edit your list preferences, or view the list archives,
>>
>>
>please
>
>
>>] visit:
>>] http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>]
>>]
>>
>>
>>_______________________________________________
>>To unsubscribe, edit your list preferences, or view the list archives,
>>
>>
>please visit:
>
>
>>http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>>
>
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives, please 
>visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
>
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to