Hello people yet again, i am still learning about Sourcemod and what the options are with it. But of course there are always a few struggles where you come through.
So. To the point, i have a few questions for the better amongst us. And those are:
1. What is the use of Data/(pack) Cells and how do i use them?
2. What is the use of "Trie"
-----------------------------
3. How can i make this simpler? for example, make a little list of words and then use that argument.
What i mean is like, combining multiple words into 1 single String(word) and then using that as a variable. I made a little script for that so you know what i mean:
------------------------------
PHP Code:
#include <sourcemod>
#pragma tabsize 0
public OnPluginStart()
{
HookUserMessage(GetUserMessageId("TextMsg"), UserMessageHook, true);
}
public Action:UserMessageHook(UserMsg:MsgId, Handle:hBitBuffer, const iPlayers[], iNumPlayers, bool:bReliable, bool:bInit)
{
BfReadByte(hBitBuffer);
decl String:strMessage[1024];
BfReadString(hBitBuffer, strMessage, sizeof(strMessage));
if(StrContains(strMessage, "!") != -1)
{
return Plugin_Handled;
}
if(StrContains(strMessage, "fuck") != -1)
{
return Plugin_Handled;
}
if(StrContains(strMessage, "cunt") != -1)
{
return Plugin_Handled;
}
if(StrContains(strMessage, "cancer") != -1)
{
return Plugin_Handled;
}
return Plugin_Continue;
}
=======================================> Combining in for example: if (StrContains(strMessage, WordList) != -1)
Thanks in advance! -General Lentils \o/
░█░░░░░░░░░░░░░░░░░░█░
░░█░░░░░░████░░░░░░█░░
░░░█░░░░█░░░░█░░░░█░░░
░░░░█░░█░░░░░░█░░█░░░░
░░░░░█░░█░░░░█░░█░░░░░
░░░░░░██▄████▄██░░░░░░