Removing the _ from names in sa:mp RP servers
#1

how to remove it?
i used these lines on my gamemode,but didn't any effect.

PHP Code:
stock GetName(playerid)
{
    new 
name[24];
    
GetPlayerName(playeridnamesizeof(name));
    
strreplace(name'_'' ');
    return 
name;

Reply
#2

You want to make it effect or remove it totaly from your server ?
Reply
#3

i want when i like :

Ahmad_Ayman says : ....
and /me takes out a gun :*Ahmad_Ayman takes out a gun,etc.....

to be like : Ahmad* *Ayman says:.....
and /me takes out a gun: *Ahmad * Ayman takes out a gun

i want the _ removed from all the players name's inside my server,and thanks.
Reply
#4

Quote:
Originally Posted by 7Ahmad7
View Post
i want when i like :

Ahmad_Ayman says : ....
and /me takes out a gun :*Ahmad_Ayman takes out a gun,etc.....

to be like : Ahmad* *Ayman says:.....
and /me takes out a gun: *Ahmad * Ayman takes out a gun

i want the _ removed from all the players name's inside my server,and thanks.
That stock should work perfectly. But are you using it correctly? Look below for an example.

(This code could be used under a command for instance. It is untested but should work, but just serves as an example.)
pawn Code:
new string[128];
format(string, sizeof(string),"%s takes out his gun.",GetName(playerid));
SendClientMessageToAll(-1, string);
Reply
#5

Yeeees,
and if you didn't understand me,i will show you what i mean from other position:
i want to remove the _ from names every chat,that's all
Reply
#6

Quote:
Originally Posted by 7Ahmad7
View Post
Yeeees,
and if you didn't understand me,i will show you what i mean from other position:
i want to remove the _ from names every chat,that's all
Yeeees, and I just showed you how to do it. Use your GetName stock.
Reply
#7

hey,i mean in every chat not the *%S takes out a gun,etc....

I want it in every chat,not this only,i mean be removed from the server.
Reply
#8

Quote:
Originally Posted by 7Ahmad7
View Post
hey,i mean in every chat not the *%S takes out a gun,etc....

I want it in every chat,not this only,i mean be removed from the server.
As I said, use your stock. Here is yet another example which should probably make you understand:

pawn Code:
public OnPlayerText(playerid, text[])
{

    new message[144];
    format(message, sizeof(message), "%s says: %s", GetName(playerid), text);
    SendClientMessageToAll(COLOR_WHITE, message);
    return 0;
}
Reply
#9

woops..
Reply
#10

hey man,i'm using it already,and it's compiling fine,but the problem
is i see in every chat the names like : Jack_Adolfo
i want it to be Jack Adolfo in every chat!
thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)