Detecting object on pickup/ position ( no player)
#2

pawn Код:
public ObjectToPoint(Float:radi, objectid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetObjectPos(objectid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) {
        return 1;
    }
    return 0;
}
Then you would do for example:

pawn Код:
if(ObjectToPoint(2.0,football,122.3518,2499.8162,16.4844))
Reply


Messages In This Thread
Detecting object on pickup/ position ( no player) - by ombre - 10.11.2011, 03:00
Re: Detecting object on pickup/ position ( no player) - by Norn - 10.11.2011, 05:00
Re : Detecting object on pickup/ position ( no player) - by ombre - 11.11.2011, 01:29

Forum Jump:


Users browsing this thread: 1 Guest(s)