25.08.2012, 10:45
Код:
warning 235: public function lacks forward declaration (symbol "ProxDetector") error 035: argument type mismatch (argument 3) error 035: argument type mismatch (argument 3) error 035: argument type mismatch (argument 3)
Код:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
pawn Код:
forward ProxDetectorS(Float:radi, playerid, targetid);
public ProxDetector(Float:radi, playerid, targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
GetPlayerPos(targetid, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//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;
}