View Single Post
Author Message
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 01-08-2017 , 09:06   [CSGO] Replace String dosen't work...
Reply With Quote #1

Hello ! The replacestring dosen't work... here is my string :

PHP Code:
public Action:SayHook(client, const String:command[], args)  
{    
    new 
String:text[192];  
    
GetCmdArgString(textsizeof(text));  

    new 
startidx 0;  
    if (
text[0] == '"'){  
        
startidx 1;  

        new 
len strlen(text);  
        if (
text[len-1] == '"') {  
            
text[len-1] = '\0';  
        }  
    }  

    if(
StrContains(text[startidx], "sound"false)!=-1){  
        
EmitSoundToAllAny("misc/soundtest.mp3");
        
ReplaceString(textsizeof(text), "sound""SOUND"false);
    }

I tried with the default of case sensitive true but it dosen't work.. HELP !

Last edited by cristian20042; 01-08-2017 at 09:07.
cristian20042 is offline