Need help with this!!!
#6

I'll make a corrected thing.. EDITING when its done.
pawn Код:
COMMAND:bc(playerid,params[])
{
   new str[128], str2[100];
   new whisperer[MAX_PLAYER_NAME];
   new Float:x,Float:y,Float:z;
   if(sscanf(params,"s[100]",str2)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/bc [Text]");
   GetPlayerPos(playerid,x,y,z);
   GetPlayerName(playerid,whisperer,sizeof(whisperer));
   format(str,sizeof(str),"WHISPER FROM %s(%d):%s",whisperer,playerid,str2);
   SetPlayerChatBubble(playerid,str2,COLOR_YELLOW,15.0,5000);
   for (new i=0; i<MAX_PLAYERS; i++)
   {
      if(IsPlayerInRangeOfPoint(i,5.0,x,y,z)) SendClientMessage(i,COLOR_YELLOW,str);
   }
   return true;
}
Let's see what things have been corrected:
- Use "s[LENTGH]" when you format a string with sscanf. You used "u" which is for a USER.
- On Loop, you added return after the range check.. I removed it and it seems to work. IDK why lol.

EDITED.
Reply


Messages In This Thread
Need help with this!!! - by Cjgogo - 26.06.2011, 14:27
Re: Need help with this!!! - by iPLEOMAX - 26.06.2011, 14:31
Re: Need help with this!!! - by Cjgogo - 26.06.2011, 14:48
Re: Need help with this!!! - by iPLEOMAX - 26.06.2011, 14:59
Re: Need help with this!!! - by Cjgogo - 26.06.2011, 15:04
Re: Need help with this!!! - by iPLEOMAX - 26.06.2011, 15:06
Re: Need help with this!!! - by Cjgogo - 26.06.2011, 15:08
Re: Need help with this!!! - by Cjgogo - 26.06.2011, 15:16
Re: Need help with this!!! - by Cjgogo - 26.06.2011, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)