[Tutorial] Deleting the '_' in RP names.
#13

or you could just use this

Code:
stock GiveNameSpace(nstring[])
{
    new strl;
    strl=strlen(nstring);
    while(strl--) {
    if(nstring[strl]=='_')	nstring[strl]=' ';
    }
    return 0;
}
Example :

Code:
new pName[MAX_PLAYER_NAME];
format(pName, sizeof(pName), "%s",  GetName(playerid));
GiveNameSpace(pName);
Then anything in the following code using pName will check if they have _ if they doo it removes it ...

for example

Code:
new pName[MAX_PLAYER_NAME], string[256];
format(pName, sizeof(pName), "%s", GetName(playerid));
GiveNameSpace(pName);
format(string, sizeof(string), "%s has just died", pName);
SendClientMessageToAll(playerid, RED, string);
Seems alot simpler than yours ...

GetName code >>
Code:
stock GetName(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof name);
	return name;
}
Credits to whoever made that ^^ ( And the GiveNameSpace )
Reply


Messages In This Thread
Deleting the '_' in RP names. - by Ihsan-Cingisiz - 30.01.2011, 20:18
Re: Deleting the '_' in RP names. - by Vince - 30.01.2011, 22:28
Re: Deleting the '_' in RP names. - by Tee - 30.01.2011, 22:39
Re: Deleting the '_' in RP names. - by Ihsan-Cingisiz - 31.01.2011, 06:14
Re: Deleting the '_' in RP names. - by Ihsan-Cingisiz - 31.01.2011, 06:15
Re: Deleting the '_' in RP names. - by leong124 - 31.01.2011, 07:23
Re: Deleting the '_' in RP names. - by bartje01 - 31.01.2011, 18:51
Re: Deleting the '_' in RP names. - by Vince - 31.01.2011, 20:30
Re: Deleting the '_' in RP names. - by Tee - 01.02.2011, 00:31
Respuesta: Deleting the '_' in RP names. - by ipsBruno - 01.02.2011, 14:29
Re: Deleting the '_' in RP names. - by Sergei - 01.02.2011, 18:14
Re: Deleting the '_' in RP names. - by Derezzed - 03.02.2011, 15:58
Re: Deleting the '_' in RP names. - by Shadow_ - 09.02.2011, 19:47
Re: Deleting the '_' in RP names. - by Krx17 - 10.02.2011, 02:16

Forum Jump:


Users browsing this thread: 1 Guest(s)