Removing the _ from names in sa:mp RP servers -
7Ahmad7 - 11.03.2014
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(playerid, name, sizeof(name));
strreplace(name, '_', ' ');
return name;
}
Re : Removing the _ from names in sa:mp RP servers -
Clad - 11.03.2014
You want to make it effect or remove it totaly from your server ?
Re: Removing the _ from names in sa:mp RP servers -
7Ahmad7 - 11.03.2014
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.
Re: Removing the _ from names in sa:mp RP servers -
PrivatioBoni - 11.03.2014
Quote:
Originally Posted by 7Ahmad7
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);
Re: Removing the _ from names in sa:mp RP servers -
7Ahmad7 - 11.03.2014
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
Re: Removing the _ from names in sa:mp RP servers -
PrivatioBoni - 11.03.2014
Quote:
Originally Posted by 7Ahmad7
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.
Re: Removing the _ from names in sa:mp RP servers -
7Ahmad7 - 11.03.2014
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.
Re: Removing the _ from names in sa:mp RP servers -
PrivatioBoni - 11.03.2014
Quote:
Originally Posted by 7Ahmad7
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;
}
Re: Removing the _ from names in sa:mp RP servers - Riddy - 11.03.2014
woops..
Re: Removing the _ from names in sa:mp RP servers -
7Ahmad7 - 11.03.2014
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