24.03.2014, 12:28
Error 017
24.03.2014, 13:02
You must first define that function you are trying to use.
IsPlayerInSphere....
IsPlayerInSphere....
24.03.2014, 13:08
24.03.2014, 13:10
IsPlayerInSphere is defined in the uf.inc (Useful Functions)
But why don't you just use IsPlayerInRangeOfPoint function which is native in SA-MP. It does pretty much the same thing.
pawn Код:
stock IsPlayerInSphere(playerid,Float:x1,Float:y1,Float:z1,Float:radius)
{
new Float:xs,Float:ys,Float:zs;
GetPlayerPos(playerid,xs,ys,zs);
return (GetDistanceBetweenPoints(xs,ys,zs,x1,y1,z1)<=radius);
}
stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) //By Gabriel "Larcius" Cordes
{
return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}
24.03.2014, 13:14
Quote:
IsPlayerInSphere is defined in the uf.inc (Useful Functions)
pawn Код:
|
http://pastebin.com/uYfxBeUa
24.03.2014, 13:24
No, I won't. It's not that hard to just add those 2 functions I posted above at the bottom of your script.
24.03.2014, 13:33
24.03.2014, 13:38
Bud all you got to do is copy this code that he gave to you and compile in your script.
But anyways here is a paste bin with the code just copy it to your script...
http://pastebin.com/sKaYLZZn
But anyways here is a paste bin with the code just copy it to your script...
http://pastebin.com/sKaYLZZn
24.03.2014, 13:58
Quote:
Bud all you got to do is copy this code that he gave to you and compile in your script.
But anyways here is a paste bin with the code just copy it to your script... http://pastebin.com/sKaYLZZn |
24.03.2014, 13:58
All you had to do was to paste those 2 functions to the script you use, it's not something others can do for you from a forum.
By the way, this line is wrong:
It should be as you had it in your first post:
By the way, this line is wrong:
pawn Код:
if(dini_Exists(path) && if(IsPlayerInSphere(playerid,atmInfo[a][aX],atmInfo[a][aY],atmInfo[a][aZ],5);
return a;
pawn Код:
if(dini_Exists(path) && IsPlayerInSphere(playerid,atmInfo[a][aX],atmInfo[a][aY],atmInfo[a][aZ],5)) return a;
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)