Problem str_replace
#1

I want to forbid this character in the chat, I'm using this code that's not working; can someone help me?
Where do I have to put it to make it working?
PHP код:
stock strreplace(string[], findreplace)
{
    for(new 
i=0string[i]; i++)
    {
        if(
string[i] == find)
        {
            
string[i] = replace;
        }
    }
}
stock GetName(playerid)
{
    new 
name[24];
    
GetPlayerName(playeridnamesizeof(name));
    
strmid(str,name,0,strlen(name),24);
    for(new 
0MAX_PLAYER_NAMEi++)
    {
        if (
str[i] == '_'str[i] = ' ';
    }
    return 
str;

Reply


Messages In This Thread
Problem str_replace - by blanic - 11.06.2016, 19:15
Re: Problem str_replace - by iGetty - 11.06.2016, 19:17
Re: Problem str_replace - by blanic - 11.06.2016, 19:25
Re: Problem str_replace - by iGetty - 11.06.2016, 19:29

Forum Jump:


Users browsing this thread: 4 Guest(s)