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.