28.04.2009, 13:33
This command is supposed to fake someones name with a message, but it doesnt work.
What i want is the players name color, then the message in white.
The problem : It now uses the whole message his name color, and if i do
/acfake 0 test
It will say: Eros: TEros
Please help me, this is my code
Thnx
What i want is the players name color, then the message in white.
The problem : It now uses the whole message his name color, and if i do
/acfake 0 test
It will say: Eros: TEros
Please help me, this is my code
pawn Код:
dcmd_acfake(playerid, params[])
{
new player, color;
new name[MAX_PLAYER_NAME+1];
new text;
new string[128];
if(!sscanf(params, "ds", player, text))
{
GetPlayerName(player, name, sizeof(name));
color = GetPlayerColor(GetPlayerID(name));
format(string, sizeof(string), "%s : %s", name, text);
SendClientMessageToAll(color, string);
}
return 1;
}
Thnx