IsPlayerAroundObject - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IsPlayerAroundObject (
/showthread.php?tid=251889)
IsPlayerAroundObject -
Lorenc_ - 29.04.2011
Hey guys i was looking around the forum for a function like this although couldnt find it
IsPlayerAroundObject(playerid, objectid, X, Y, Z)
Basicly that, if any one has it for mehhs
Re: IsPlayerAroundObject -
iggy1 - 29.04.2011
Can't you just do a range check on the object? Or you need something more than that?
pawn Код:
IsPlayerAroundObject(playerid, objectid, Float:Range = 10.0)
{
new
Float:o_x, Float:o_y, Float:o_z;
GetObjectPos(objectid, o_x, o_y, o_z);
if(IsPlayerInRangeOfPoint(playerid, Range, o_x, o_y, o_z))
return 1;
return 0;
}
Problem is different sized objects
Re: IsPlayerAroundObject -
Salsa - 29.04.2011
Or use Ultimate Ingame Editor u can place armour healths and more pickups anywhere If u need Tell me i will give u Link
Re: IsPlayerAroundObject -
Lorenc_ - 29.04.2011
Quote:
Originally Posted by iggy1
Can't you just do a range check on the object? Or you need something more than that?
pawn Код:
IsPlayerAroundObject(playerid, objectid, Float:Range = 10.0) { new Float:o_x, Float:o_y, Float:o_z; GetObjectPos(objectid, o_x, o_y, o_z); if(IsPlayerInRangeOfPoint(playerid, Range, o_x, o_y, o_z)) return 1; return 0; }
Problem is different sized objects
|
Yea what im trying to make is something like a IsPlayerAroundFlame function.. I guess i tried making that aswell, neither mine or yours worked although the OBJECTID im aiming to get 18691
Quote:
Originally Posted by Salsa
Or use Ultimate Ingame Editor u can place armour healths and more pickups anywhere If u need Tell me i will give u Link
|
I lol'd
EDIT: Tweaked something, made it work. Thanks.