Pawno hates me -.-# -
Trooper[Y] - 24.06.2010
Hey girls.
Currently, i have this snippet :
Код:
stock DistanceCameraTargetToLocation(Float:CamX, Float:CamY, Float:CamZ, Float:ObjX, Float:ObjY, Float:ObjZ, Float:FrX, Float:FrY, Float:FrZ)
{
new Float:TGTDistance;
// get distance from camera to target
TGTDistance = floatsqroot((CamX - ObjX) * (CamX - ObjX) + (CamY - ObjY) * (CamY - ObjY) + (CamZ - ObjZ) * (CamZ - ObjZ));
new Float:tmpX, Float:tmpY, Float:tmpZ;
tmpX = FrX * TGTDistance + CamX;
tmpY = FrY * TGTDistance + CamY;
tmpZ = FrZ * TGTDistance + CamZ;
new Float:calc = floatsqroot((tmpX - ObjX) * (tmpX - ObjX) + (tmpY - ObjY) * (tmpY - ObjY) + (tmpZ - ObjZ) * (tmpZ - ObjZ));
printf("%f %d",calc,(calc < 10.0));
return (calc < 10.0);
}
and i use it like this :
Код:
if(DistanceCameraTargetToLocation(cx, cy, cz, cc_p[0],cc_p[1],cc_p[2], fx, fy, fz) == 1)
or
Код:
if(DistanceCameraTargetToLocation(cx, cy, cz, cc_p[0],cc_p[1],cc_p[2], fx, fy, fz))
Printout :
I mean, what the god dawn ...
I have 1,4 as float - ok
The result is = 1
But even in the printout its 1, my if-condition isnt true
Why ?
This have to be some odd bug from pawno...
Regards,
Trooper
Re: Pawno hates me -.-# -
Antonio [G-RP] - 24.06.2010
1. Shiity title.
2. How do you expect help calling us girls?
Grow up kid. Seriously.
Re: Pawno hates me -.-# -
kaallaaroy - 24.06.2010
sad state, no dolls
Re: Pawno hates me -.-# -
Trooper[Y] - 24.06.2010
Hm, its just for attracking your attention (worked fine),
as this category gets flooded with requests.
Girls is, cause i love scrubs...
If you dont like it, i wont use it anymore.
Re: Pawno hates me -.-# -
Hiddos - 24.06.2010
Yep, it worked.
I'm not sure, but it might be because you're returning a float value. Maybe try if(bla == float(1))?
Re: Pawno hates me -.-# -
Trooper[Y] - 24.06.2010
I dont return a float value anywhere
Re: Pawno hates me -.-# -
Hiddos - 24.06.2010
Quote:
Originally Posted by Trooper[Y
]
I dont return a float value anywhere
|
AFAIK, that's a float value.
Re: Pawno hates me -.-# -
Trooper[Y] - 24.06.2010
printf("%f %d",calc,(calc < 10.0));
I return %d
Re: Pawno hates me -.-# -
Flashy - 24.06.2010
Quote:
Originally Posted by ♂ Antonio [G-RP
]
1. Shiity title.
2. How do you expect help calling us girls?
Grow up kid. Seriously.
|
I have watch you and now I have some conclusions:
Stop to annoy the whole forum with you spam and childish post because you never give some tips. You just look around what users make wrong and then you annoy them with this.
You have no right to control how people chose there title for topics. Grow up please (you!)
Topic: Like Hiddos said.