So basically i'm trying todo a simple check if a players name contains other chars then what i want to , i tried doing as i'm doing in PHP but it seems like it doesnt work.
PHP Code:
new Handle:regeex = INVALID_HANDLE;
public OnPluginStart() { RegConsoleCmd("say", Command_SayChat); RegConsoleCmd("say_team", Command_SayChat);
regeex = CompileRegex("/^[a-zA-Z0-9]+$/"); }
public Action:Command_SayChat(client, args) { decl String:text[192]; GetCmdArgString(text, sizeof(text)); if (MatchRegex(regeex, text) > 0) { LogAction(client, -1, "char was blocked"); return Plugin_Handled; } return Plugin_Continue; }
Edit: The matching text is just for testing purposes to easier try it out , the function will be against names later!