28.07.2014, 01:09
I have a command /say and it also uses this
https://sampforum.blast.hk/showthread.php?tid=528401
So when you do /say Hello * Raises hand * < The text in the "*" should be purple but insted it gives me unknown command but if i do /say Hello it will work and show Jesse Brook says hello
Here is the stock i used
Here is the command
Rep for help thanks
https://sampforum.blast.hk/showthread.php?tid=528401
So when you do /say Hello * Raises hand * < The text in the "*" should be purple but insted it gives me unknown command but if i do /say Hello it will work and show Jesse Brook says hello
Here is the stock i used
pawn Код:
stock FilterAsterisk(msg[], msglen = sizeof(msg))
{
new i = 0, asteriskPair = 0;
while (msg[i] != '\0')
{
if (msg[i] == '*')
{
if (asteriskPair == 0)
{
asteriskPair++;
strins(msg, "{800080}", i, msglen);
}
else
{
asteriskPair = 0;
strins(msg, "{FFFFFF}", i, msglen);
}
}
i++;
}
}
Here is the command
pawn Код:
CMD:say(playerid, params[])
{
new text[256],embed_msg[144],string[144];
if(sscanf(params, "s[256]", text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /say {FFFFFF}[text]");
else
{
if(gPlayerLogged{playerid} == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
if(PlayerInfo[playerid][pMuted] == 1)return SendClientMessage(playerid, COLOR_LIGHTRED, "You are currently muted !");
else if(PlayerInfo[playerid][pMask] == 1)
{
if(PlayerInfo[playerid][pAccent] >= 2)
{
format(string, sizeof(string), "Stranger says: [Accent %s] %s",GetPlayerAccent(playerid),text);
}
else
{
format(string, sizeof(string), "Stranger says: %s",text);
}
}
else
{
if(PlayerInfo[playerid][pAccent] >= 2)
{
format(string, sizeof(string), "%s says: [Accent %s] %s",GetPlayerNameEx(playerid),GetPlayerAccent(playerid),text);
}
else
{
format(string, sizeof(string), "%s says: %s",GetPlayerNameEx(playerid),text);
}
}
strcat((embed_msg[0] = '\0', embed_msg), string);
FilterAsterisk(string);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);SetPlayerChatBubble(playerid, string, COLOR_WHITE, 10.0, strlen(text)*100);
}
return 1;
}
Rep for help thanks