How can i remove the "_" from the name in the chat? -
Don_Cage - 09.01.2013
Well the title say it all, Where in the script can i find how to remove it? And how can I also apply the "talking" annimation when you say something?
Re: How can i remove the "_" from the name in the chat? -
[HK]Ryder[AN] - 09.01.2013
Talking Animation, put this code in OnPlayerText
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
ApplyAnimation(playerid, "MISC", "Idle_Chat_02", 4.1, 0, 1, 1, 1, 1);
}
To remove the _
Paste this stock out of a callback
pawn Код:
stock strreplace(string[], find, replace)
{
for(new i=0; string[i]; i++)
{
if(string[i] == find)
{
string[i] = replace;
}
}
}
Then in OnPlayerText again
pawn Код:
new name[24];
GetPlayerName(playerid, name, sizeof(name));
strreplace(name, '_', ' ');
Re: How can i remove the "_" from the name in the chat? -
Don_Cage - 09.01.2013
I didnt quite understand the part with the callback, Could you explain little more how to do it?
Re: How can i remove the "_" from the name in the chat? -
Glad2BeHere - 09.01.2013
stock RPTEXT(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}
eg
pawn Код:
new string[128];
format(string, sizeof(string), "%s",RPN(playerid));
SendClientMessage(playerid, -1, string);
Re: How can i remove the "_" from the name in the chat? -
Don_Cage - 09.01.2013
I found this, is it right?
pawn Код:
stock GetPlayerNameEx(playerid)
{
new string[24];
GetPlayerName(playerid,string,24);
new str[24];
strmid(str,string,0,strlen(string),24);
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if (str[i] == '_') str[i] = ' ';
}
return str;
}
Re: How can i remove the "_" from the name in the chat? -
Don_Cage - 09.01.2013
help please
Re: How can i remove the "_" from the name in the chat? -
Don_Cage - 11.01.2013
When i talk in the chat and the annimation stops it dosnt "clear" the annimation, it stops and then the player's hands is just still, even when you walk. Can i fix this with
pawn Код:
ClearAnimations(playerid);
?