Raised This Month: $51 Target: $400
 12% 

Say Commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eichhoernchen
Junior Member
Join Date: Mar 2005
Old 03-14-2005 , 18:24   Say Commands
Reply With Quote #1

I know how to notice if a player says something, but I want
that if a player says a specific word that something happens.
I got this now:

Code:
if (  FStrEq( pcmd, "say" ) ) 
	{
	    IPlayerInfo* playerInfo;
            playerInfo = playerinfomanager->GetPlayerInfo(pEntity);
	 	
	    KeyValues *kv = new KeyValues( "msg" );
	    kv->SetString( "title",  playerInfo->GetName());
	    kv->SetInt( "level", 1 );
	    kv->SetInt( "time", 20 );
		
	   helpers->CreateMessage( pEntity, DIALOG_MSG, kv, this );
	   kv->deleteThis();
	   return PLUGIN_STOP; 
	}
I want that if a player says: "myname" that his name will be displayed in a messagebox.

This is just for understanding and lerning.
Maybe I'll write a rollthedice plugin.
Eichhoernchen is offline
Reply



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


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