IsPlayerAroundObject
#1

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
Reply
#2

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
Reply
#3

Or use Ultimate Ingame Editor u can place armour healths and more pickups anywhere If u need Tell me i will give u Link
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)