04.01.2009, 22:41
Quote:
|
Originally Posted by Seif_
You should have at least compiled it. This will give multiple errors.
|
and here my version
pawn Код:
enum IAPModes
{
iap_playerid,
iap_vehicleid,
iap_objectid
}
pawn Код:
stock IsAtPoint(Float:radi, IAPModes:mode, id, Float:X, Float:Y, Float:Z)
{
new Float:Pos[3];
switch(mode)
{
case iap_playerid: GetPlayerPos(id, Pos[0], Pos[1], Pos[2]);
case iap_vehicleid: GetVehiclePos(id, Pos[0], Pos[1], Pos[2]);
case iap_objectid: GetObjectPos(id, Pos[0], Pos[1], Pos[2]);
}
if( -radi < floatsub(Pos[0], X) < radi &&
-radi < floatsub(Pos[1], Y) < radi &&
-radi < floatsub(Pos[2], Z) < radi ) return 1;
return 0;
}

