OnPlayerText Bug
#1

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;
}


Reply
#2

remove return 1;
Reply
#3

where to delete it ?
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)