Help with command if(!PlayerToPoint
#5

Look:
PHP код:
if(!PlayerToPoint(2.0, playerid, 2405.4531, 1022.8162, 10.4792); 
Makes no sense...

Do it:

PHP код:
if(!PlayerToPoint(2.0, playerid, 2405.4531, 1022.8162, 10.4792)) return 1; 
you missed a bracket

there's the function
PHP код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);  
    
public 
PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
 
{
 
new 
Float:oldposx, Float:oldposy, Float:oldposz;
 new 
Float:tempposx, Float:tempposy, Float:tempposz;
 
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
 
tempposx = (oldposx -x);
 
tempposy = (oldposy -y);
 
tempposz = (oldposz -z);
 
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
 
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
 
{
 
return 
1;
 
}
 
 return 
0;
} 
Reply


Messages In This Thread
Help with command if(!PlayerToPoint - by boyan96 - 30.05.2011, 04:55
Re: Help with command if(!PlayerToPoint - by sansko - 30.05.2011, 05:16
Re: Help with command if(!PlayerToPoint - by boyan96 - 30.05.2011, 05:29
Re: Help with command if(!PlayerToPoint - by sansko - 30.05.2011, 05:45
Re: Help with command if(!PlayerToPoint - by yanir3 - 30.05.2011, 05:49
Re: Help with command if(!PlayerToPoint - by boyan96 - 30.05.2011, 06:06
Respuesta: Help with command if(!PlayerToPoint - by Lunnatiicz - 30.05.2011, 06:09
Re: Help with command if(!PlayerToPoint - by boyan96 - 30.05.2011, 06:13
Re: Help with command if(!PlayerToPoint - by newarvuti - 30.05.2011, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)