Sendclient message!!!
#5

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
PHP код:
new string[128]; new Name[MAX_PLAYER_NAME];
GetPlayerName(playeridNamesizeof(Name));
format(stringsizeof(string), "%s has opened Garage 1"Name);
SendNearbyMessage(playerid10stringCOLOR_YELLOWCOLOR_YELLOWCOLOR_YELLOWCOLOR_YELLOWCOLOR_YELLOW);
stock SendNearbyMessage(playeridFloat:radiusstring[], col1col2col3col4col5)
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    new 
Float:ixFloat:iyFloat:iz;
    new 
Float:cxFloat:cyFloat:cz;
    foreach(
Playeri)
    {
        if(
IsPlayerLoggedIn(i))
        {
            if(
GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
            {
                
GetPlayerPos(iixiyiz);
                
cx = (ix);
                
cy = (iy);
                
cz = (iz);
                if(((
cx radius/16) && (cx > -radius/16)) && ((cy radius/16) && (cy > -radius/16)) && ((cz radius/16) && (cz > -radius/16)))
                {
                    
SendClientMessage(icol1string);
                }
                else if(((
cx radius/8) && (cx > -radius/8)) && ((cy radius/8) && (cy > -radius/8)) && ((cz radius/8) && (cz > -radius/8)))
                {
                    
SendClientMessage(icol2string);
                }
                else if(((
cx radius/4) && (cx > -radius/4)) && ((cy radius/4) && (cy > -radius/4)) && ((cz radius/4) && (cz > -radius/4)))
                {
                    
SendClientMessage(icol3string);
                }
                else if(((
cx radius/2) && (cx > -radius/2)) && ((cy radius/2) && (cy > -radius/2)) && ((cz radius/2) && (cz > -radius/2)))
                {
                    
SendClientMessage(icol4string);
                }
                else if(((
cx radius) && (cx > -radius)) && ((cy radius) && (cy > -radius)) && ((cz radius) && (cz > -radius)))
                {
                    
SendClientMessage(icol5string);
                }
            }
        }
    }
    return 
1;

Hmm thx but 1 question do i need to place this wole under the command ??
(i got the command a few times )
Reply


Messages In This Thread
Sendclient message!!! - by firemanjv - 04.01.2013, 19:27
Re: Sendclient message!!! - by firemanjv - 05.01.2013, 06:39
Re: Sendclient message!!! - by dr.lozer - 05.01.2013, 06:45
Re: Sendclient message!!! - by ThePhenix - 05.01.2013, 06:45
Re: Sendclient message!!! - by firemanjv - 05.01.2013, 06:50

Forum Jump:


Users browsing this thread: 1 Guest(s)