14.11.2016, 18:51
Hello !
when someone send a message to main chat the got spamed two times ._. idk why
like this
there my code writed on co-json but is simillar as Pawno
There any fix's ?
when someone send a message to main chat the got spamed two times ._. idk why
like this
PHP код:
[5] ]H[LikeMrYassine: Hii
]H[LikeMrYassine: Hii
[5] ]H[LikeMrYassine: :O
]H[LikeMrYassine: :O
PHP код:
OnPlayerText_JSON playertext
{
ReactionText
{
case true:
{
if(!strcmp(xChars, text, false))
{
new
string[128],
pName[MAX_PLAYER_NAME]
;
playerName(IdPlayer, pName, sizeof(pName));
messageFormat(string, sizeof(string), "« \%s\" has won the reaction test. »", pName);
sendGlobalMessage(GREEN, string);
messageFormat(string, sizeof(string), "« You have earned $%d + %d score points. »", xCash, xScore);
sendMessage(IdPlayer, GREEN, string);
sendMoney(IdPlayer, xCash);
SetPlayerScore(IdPlayer, playerScore(IdPlayer) + xScore);
xReactionTimer = TimerStart("xReactionTest", TIME, 1);
xTestBusy = false;
}
}
}
if(text[0] == '#' && Info[IdPlayer][indm] == 1)
{
new str[128], name[MAX_PLAYER_NAME];
playerName(IdPlayer, name, sizeof(name));
messageFormat(str, sizeof(str), ""REDx"[DM CHAT] %s: "WHITEx"%s", name, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(playerNotConnected(i)) continue;
if(Info[i][indm] == 0 )continue;
sendMessage(i, -1, str);
}
}
if(P_Data[IdPlayer][pMute] == 1)
{
sendMessage(IdPlayer, COLOR_RED, "You are muted, noone can hear you!");
}
else
{
new pname[128];
playerName(IdPlayer,pname,sizeof(pname));
new stf[128];
new stringig[128];
messageFormat(stf, sizeof(stf), "[%d] %s: "WHITEx"%s", IdPlayer, pname, text);
sendGlobalMessage(playerColor(IdPlayer), stf);
messageFormat(stringig,sizeof(stringig),"02[%d] 07%s: %s",IdPlayer, pname,text);
IRC_Say(groupID, IRC_ECHO, stringig);
}
json_print("The Co-JSON Chat Manager LOADED !");
return (true);
}