09.02.2011, 19:47
or you could just use this
Example :
Then anything in the following code using pName will check if they have _ if they doo it removes it ...
for example
Seems alot simpler than yours ...
GetName code >>
Credits to whoever made that ^^ ( And the GiveNameSpace )
Code:
stock GiveNameSpace(nstring[]) { new strl; strl=strlen(nstring); while(strl--) { if(nstring[strl]=='_') nstring[strl]=' '; } return 0; }
Code:
new pName[MAX_PLAYER_NAME]; format(pName, sizeof(pName), "%s", GetName(playerid)); GiveNameSpace(pName);
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);
GetName code >>
Code:
stock GetName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof name); return name; }