White text OnPlayerText - + rep.
#1

PHP код:
public OnPlayerText(playeridtext[])
{
    new 
pname[24], str[128];
    
GetPlayerName(playeridpname24);
    
format(strsizeof(str), "%s: %s"pnametext);
    
ProxDetector(10.0playeridstr,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    return 
0;

Look i want to get the white color off, so the players color shows instead.

but when i do i get errors.

PHP код:
forward ProxDetector(Float:radiplayeridstring[],col1,col2,col3,col4,col5);
public 
ProxDetector(Float:radiplayeridstring[],col1,col2,col3,col4,col5)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:posxFloat:posyFloat:posz;
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        
GetPlayerPos(playeridoldposxoldposyoldposz);
        
//radi = 2.0; //Trigger Radius
        
for(new 0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
            {
                
GetPlayerPos(iposxposyposz);
                
tempposx = (oldposx -posx);
                
tempposy = (oldposy -posy);
                
tempposz = (oldposz -posz);
                
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,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);
                }
            }
            else
            {
                
SendClientMessage(icol1string);
            }
        }
    }
//not connected
    
return 1;

Reply


Messages In This Thread
White text OnPlayerText - + rep. - by Lynet - 22.12.2012, 08:20
Re: White text OnPlayerText - + rep. - by Lynet - 22.12.2012, 08:59
Re: White text OnPlayerText - + rep. - by park4bmx - 22.12.2012, 09:22
Re: White text OnPlayerText - + rep. - by Lordzy - 22.12.2012, 09:34
Re: White text OnPlayerText - + rep. - by Lynet - 22.12.2012, 09:40
Re: White text OnPlayerText - + rep. - by Konstantinos - 22.12.2012, 09:40
Re: White text OnPlayerText - + rep. - by Lynet - 22.12.2012, 09:46
Re: White text OnPlayerText - + rep. - by Konstantinos - 22.12.2012, 09:50
Re: White text OnPlayerText - + rep. - by Lynet - 22.12.2012, 09:55
Re: White text OnPlayerText - + rep. - by Lordzy - 22.12.2012, 10:13

Forum Jump:


Users browsing this thread: 1 Guest(s)