Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Problem str_replace

$
0
0
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 Code:

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;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>