[PEDIDO] Chat igual de RPG
#2

PHP код:
forward ProxDetector(Float:radiplayeridstring[], col1col2col3col4col5);
public 
OnPlayerText(playeridtext[])
{
    
ProxDetector(10playeridtext0xFFFFFFFF0xFFFFFFFF0xFFFFFFFF0xFFFFFFFF0xFFFFFFFF);
    return 
1;
}
public 
ProxDetector(Float:radiplayeridstring[], col1col2col3col4col5)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:posxFloat:posyFloat:posz;
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        
GetPlayerPos(playeridoldposxoldposyoldposz);
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                
GetPlayerPos(iposxposyposz);
                
tempposx = (oldposx -posx);
                
tempposy = (oldposy -posy);
                
tempposz = (oldposz -posz);
                if (((
tempposx radi/16) && (tempposx > -radi/16)) && ((tempposy radi/16) && (tempposy > -radi/16)) && ((tempposz radi/16) && (tempposz > -radi/16)))
                {
                    
SendClientMessage(icol1string);
                }
                else if (((
tempposx radi/8) && (tempposx > -radi/8)) && ((tempposy radi/8) && (tempposy > -radi/8)) && ((tempposz radi/8) && (tempposz > -radi/8)))
                {
                    
SendClientMessage(icol2string);
                }
                else if (((
tempposx radi/4) && (tempposx > -radi/4)) && ((tempposy radi/4) && (tempposy > -radi/4)) && ((tempposz radi/4) && (tempposz > -radi/4)))
                {
                    
SendClientMessage(icol3string);
                }
                else if (((
tempposx radi/2) && (tempposx > -radi/2)) && ((tempposy radi/2) && (tempposy > -radi/2)) && ((tempposz radi/2) && (tempposz > -radi/2)))
                {
                    
SendClientMessage(icol4string);
                }
                else if (((
tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
                {
                    
SendClientMessage(icol5string);
                }
              }
        }
    }
    return 
1;

Reply


Messages In This Thread
[PEDIDO] Chat igual de RPG - by [AF]Junior - 30.06.2011, 19:20
Re: [PEDIDO] Chat igual de RPG - by Shadoww5 - 30.06.2011, 19:55
Re: [PEDIDO] Chat igual de RPG - by Ricop522 - 30.06.2011, 20:10
Re: [PEDIDO] Chat igual de RPG - by [AF]Junior - 30.06.2011, 20:28
Re: [PEDIDO] Chat igual de RPG - by TheGarfield - 30.06.2011, 20:37
Re: [PEDIDO] Chat igual de RPG - by Sr.Pekeno - 01.07.2011, 00:17
Re: [PEDIDO] Chat igual de RPG - by RockFire - 01.07.2011, 00:25
Re: [PEDIDO] Chat igual de RPG - by [AF]Junior - 01.07.2011, 01:23
Re: [PEDIDO] Chat igual de RPG - by Falcon. - 01.07.2011, 01:26
Re: [PEDIDO] Chat igual de RPG - by crush_ - 01.07.2011, 01:30

Forum Jump:


Users browsing this thread: 1 Guest(s)