AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   message help (https://forums.alliedmods.net/showthread.php?t=45703)

Painkiller{NL} 10-09-2006 14:29

message help
 
1 Attachment(s)
Hi
Im trying to make a plugin that let's people glow when they use say or say_team. This is an idea I had from the Unreal Tournament series (when you are typing a message your character does an animation). The problem is, I just can't figure out how to let someone glow when he uses it (basicly the whole plugin :wink:). I want people to glow green when the use say and glow yellow when they use say_team
If someone knows how to make this one... please help.

Btw if you haven't already guessed, I'm a scripting noob :mrgreen:

I've also added the .sma file with the stuf I already had (not much :mrgreen:)

Silencer123 10-09-2006 15:42

Re: message help
 
I suggest you download some simple Plugins Source Code and learn from it,
because just what you are asking for here is more of a Plugin request than a Help request.
;)
How ever, here you go:
Code:
/* This is a comment */ // This is a comment, too /* Below you see how to include an *.inc File. They are needed in Order to use specific Functions */ #include <amxmodx> /* Always needed. Basic Functions like registering Plugin */ #include <fun> /* Fun Stuff. Glowing, changing Health and Armor and so on... */ #define VERSION "1.0" /* The current Version of your Plugin */ public plugin_init() /* This is called/executed when the Plugin loads/Map starts */ {     register_plugin("Speak and Glow",VERSION,"Silencer") /* Registers your Plugin. This is neccesary. */ } public client_command(id) /* A special Function called when a Client does a Command. */ {     new type[16] /* Create a new Variable to store Data inside */     read_argv(0,type,15) /* In short, this will write the Command the Player used into the variable "type". Look up functions in amxmodx.org Function Database. */     if(equali(type,"say")) /* Self explaining - Look up the Function */     {         set_user_rendering(id,kRenderFxGlowShell,0,255,0,kRenderNormal,4) /* Green Glowing with Glow Shell Thickness of 4 (Thin) */     }     else     {         if(equali(type,"say_team")) /* Self explaining - Look up the Function */         {             set_user_rendering(id,kRenderFxGlowShell,0,255,255,kRenderNormal,4) /* Yellow Glowing with Glow Shell Thickness of 4 (Thin) */         }     }     // Use this to set Players rendering back to normal:     // set_user_rendering(id,kRenderFxNone,0,0,0,kRenderNormal,0)     // Note that "id" is a Variable which comes with the Function client_command,     // which is the Players Entity Id, going from 1 to 32. }
Note that the Player will glow after he used "say" or "say_team".
You cannot make him Glow while he is typing a message, because the
Client/Player/User is not sending that Information to the Server in that Moment.

Painkiller{NL} 10-09-2006 16:53

Re: message help
 
Thx for the plugin, but it wassen't exactly what I meant. I should have explained it better.
I heard that, what I tried to do, isn't possible. I'll explain.

I wanted to create a plugin the would let a player glow when he is typing.
It had to begin glowing as soon as the player pushes the "say"-button or "say_team"-button, so when the cmd is sent that someone is writing. But I also wanted it to glow the whole period someone is writing, from beginning to the end (when the person "sends" the message). This isn't possible, the server can't see someone is writing. So, my idea is impossible :cry::(.
But thanks for your time to help me with this.
I hope I can make the next plugin by myself :mrgreen:

Zenith77 10-09-2006 17:01

Re: message help
 
I don't think this can be done server side.

MaximusBrood 10-10-2006 14:51

Re: message help
 
No. The say command is only send to the server at the time the message is ready.
From the original point of view of HL1 it doesn't make any sense to let the server know that the client is typing a message.


All times are GMT -4. The time now is 04:52.

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