Whisper problem
#3

When i'm away from anybody it gives me 2 msg's, 1 with the params and one with You are to ..etc?
Any ideas why?

PHP код:
CMD:w(playeridparams[])
{
    new 
Float:xFloat:yFloat:zFloatx1Floaty1Floatz1Floatdistiok 0;
    if(
sscanf(params,"u",mystring)) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USAGE: {FFFFFF}/w [message]");
    
GetPlayerPos(playeridxyz);
    for( 
0MAX_PLAYERSi++)
    {
        
GetPlayerPos(ix1y1z1);
        
dist floatsqroot((x-x1)*(x-x1) + (y-y1)*(y-y1) + (z-z1)*(z-z1));
         if(
dist <= 10.0)
         {
            
GetPlayerName(playeridpnamesizeof(pname));
            
format(mystringsizeof(mystring),"%s whispred: %s"pnameparams);
            
SetPlayerChatBubble(playeridparamsCOLOR_ORANGE10.010000);
            
SendClientMessage(,COLOR_ORANGEmystring);
            if(
!= playerid)
            {
                
ok 1;
            }
         }
    }
if(
ok == 0)
{
SendClientMessage(playerid ,COLOR_ORANGE"You are to for from anybody");
}
 return 
1;

Reply


Messages In This Thread
Whisper problem - by Bogdan1992 - 16.01.2012, 16:55
Re: Whisper problem - by rinori - 16.01.2012, 19:16
Re: Whisper problem - by Bogdan1992 - 16.01.2012, 20:26
Re: Whisper problem - by Tanush123 - 16.01.2012, 21:24
Re: Whisper problem - by Bogdan1992 - 16.01.2012, 21:36
Re: Whisper problem - by Tanush123 - 17.01.2012, 00:51
Re: Whisper problem - by 2KY - 17.01.2012, 01:17

Forum Jump:


Users browsing this thread: 1 Guest(s)