Textdraws
#1

I have this code
pawn Код:
if (strcmp("/hidetext", cmdtext, true, 10) == 0)
  {
  for(new i = 0; i < MAX_PLAYERS; i++)
  TextDrawHideForPlayer(i, Announcements); SendClientMessage(playerid, COLOR_GOLD, "Info textdraws are now hiden - use /showtext to enable textdraws");
  return 1;
  }
But when anybody uses this command, then it will hide this textdraws for every player.
How can i do that it hides only for that player who did /hidetext ?
Reply
#2

pawn Код:
if (strcmp("/hidetext", cmdtext, true, 10) == 0)
{
TextDrawHideForPlayer(playerid, Announcements); SendClientMessage(playerid, COLOR_GOLD, "Info textdraws are now hiden - use /showtext to enable textdraws");
return 1;
}
Reply
#3

Simply change the 'i' from TextDrawHideForPlayer to 'playerid'
Reply
#4

Quote:
Originally Posted by Jochemd
Simply change the 'i' from TextDrawHideForPlayer to 'playerid'
Thanks, fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)