View Single Post
Markiez
Junior Member
Join Date: Mar 2018
Location: somewhere over the rainbow
Old 05-07-2018 , 10:07   Re: Everyone please help me
Reply With Quote #10

Quote:
Originally Posted by ThatKidWhoGames View Post
StrContains isn't a boolean, you need to check if it doesn't equal -1.
Code:
#include <sourcemod>

#pragma semicolon 1

public Action:OnClientSayCommand(client)
{
    decl String:text[99];
    GetCmdArgString(text, sizeof(text));
    
    if (StrContains(text, "@") != -1)
    {
    	//do smth here
    }
}
happy? xD

final shit should look smth leik dis:
Code:
#include <sourcemod>

#pragma semicolon 1

public Action:OnClientSayCommand(client)
{
    decl String:text[99];
    GetCmdArgString(text, sizeof(text));
    
    if (StrContains(text, "@") != -1 && CheckCommandAccess(client, "adminsomethingidunno", ADMFLAG_GENERIC))
    {
    	KickClient(client, "sorri :(");
    }
}
__________________
bool am_I_retarded = true;

Last edited by Markiez; 05-07-2018 at 10:11.
Markiez is offline