SA-MP Forums Archive
OnPlayerText Bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerText Bug (/showthread.php?tid=434443)



OnPlayerText Bug - Guest123 - 02.05.2013

hi i got 2 text, i just send 1 text

pawn Код:
public OnPlayerText(playerid, text[])
{
  if(PlayerAfk[playerid] == 1)
  {
  SendClientMessage(playerid, COLOR_WHITE, "You Cannot Speak While{00ffff} AFK!!{ffffff}!");
  }
  else if(PlayerAfk[playerid] == 0)
  {
  new name[MAX_PLAYER_NAME], msg[128];
  GetPlayerName(playerid, name, sizeof(name));
  format(msg, sizeof(msg), "{00FFFF}(%d) {ffffff}%s", playerid, text);
  SendPlayerMessageToAll(playerid, msg);
  return 1;
  }
 return 0;
}





Re: OnPlayerText Bug - Pottus - 02.05.2013

remove return 1;


Re: OnPlayerText Bug - Guest123 - 02.05.2013

where to delete it ?


Re: OnPlayerText Bug - mineralo - 02.05.2013

pawn Код:
public OnPlayerText(playerid, text[])
{
  if(PlayerAfk[playerid] == 1)
  {
  SendClientMessage(playerid, COLOR_WHITE, "You Cannot Speak While{00ffff} AFK!!{ffffff}!");
  }
  else if(PlayerAfk[playerid] == 0)
  {
  new name[MAX_PLAYER_NAME], msg[128];
  GetPlayerName(playerid, name, sizeof(name));
  format(msg, sizeof(msg), "{00FFFF}(%d) {ffffff}%s", playerid, text);
  SendPlayerMessageToAll(playerid, msg);
  }
 return 0;
}