:-\ I created a script and its almost going to finish but my problem is everything(messages and error syntaxes)appears in the text box doubled and I don't know from where I can fix it and I don't show any code here as becoz I don't know where is the bug from..... :-\ .
I understood nothing.
OK in simple words:::while chatting or any thing appearing in the text box comes two times/same msg 2 times.......that s the problem...
So... are we supposed to guess what's wrong now?
I don't tell only to u.....so if anyone knows how to fix it plz tell
Quote from: Shovon^ on Aug 27, 2016, 04:44 AMI don't tell only to u.....so if anyone knows how to fix it plz tell
How can we help you if you don't show us any code lol.
As per your words I am guessing that you have done 2 things on onPlayerChat. I think you did Message( or any other function to send message ) to send the message of the player to the server and also used return 1.
give us screenshot of your onplayerchat function
here:
function onPlayerChat( player, text )
{
EchoMessage( ICOL_LBLUE + "[" + player.ID + "]" + player.Name + ":" + ICOL_BLACK + " " + text + " " );
if ( text=="afk" || text=="brb")
{
if ( Stats[ player.ID ].Logged == false ) MessagePlayer( "[#00FF00][Error] [#FF4500]-[#FFFF00] Whether you're logged in", player );
else if ( Stats[ player.ID ].Reg == false ) MessagePlayer( "[#00FF00][Error] [#FF4500]-[#FFFF00] You are not registered", player );
else if ( !player.IsSpawned ) MessagePlayer(" [#FFFFFF][[#FF0000]Error[#FFFFFF]] [#FF0000] You need to spawn .", player );
else{
if(Stats[ player.ID ].playerAFK== false){
QuerySQL( Registros, "INSERT INTO AFK ( Nombre , POSAFKX , POSAFKY , POSAFKZ , ANGLEAFK ) VALUES ( '"+player.Name+"', '"+player.Pos.x+"', '"+player.Pos.y+"', '"+player.Pos.z+"', '"+player.Angle+"' )" );
EchoMessage( ICOL_LBLUE + ""+player.Name+": now returns " );
Message(""+GetTeamTocolor(player.Team)+""+player.Name+"[#00FF00]: now returns.");
Stats[ player.ID ].playerAFK= true;
player.Pos = Vector( 474.23223, -1717.48022, 62.5);
player.Angle=90;
player.IsFrozen = true;
}
Remove the EchoMessage, i think.
ok i will try it
:)
Show us your EchoMessage function too :)
Cant find the Echomessage function....
This???:
function EMessagePlayer(player, type, ...)
{
vargv.insert(0, this);
switch (type)
{
case Msgtype.Info:
MessagePlayer(InfoMessage(format.acall(vargv)), player);
break;
case Msgtype.Command:
MessagePlayer(CommandMessage(format.acall(vargv)), player);
break;
case Msgtype.Error:
MessagePlayer(ErrorMessage(format.acall(vargv)), player);
break;
}
return 1;
}
EchoMessage = send to IRC
Why do you have an EMessagePlayer function when I dont even see you using it -.-
R u talking about the M-Echo.nut file ???
Quote from: Shovon^ on Aug 27, 2016, 08:19 AMR u talking about the M-Echo.nut file ???
yes. try finding the function in all of your scripts.
Which account system you use?
How are you sending message to game with EchoMessage lol......
i dont know i forgot......but i dint figure out how to fix it
:o
Quote from: Shovon^ on Aug 27, 2016, 10:15 AMi dont know i forgot......but i dint figure out how to fix it
:o
Fool post the echo message function not Emessage
:/
Fixed and thnx for suggestion