IsPlayerNearVehicle(playerid, vehicleid, Float:distance)
#6

You can use that
pawn Код:
native Float:GetVehicleDistanceFromPoint(vehicleid, Float:X, Float:Y, Float:Z);
Quote:
Originally Posted by AustinJ
Посмотреть сообщение
Should be as simple as this shouldn't it?

Код:
stock IsPlayerNearVehicle(playerid, vehicleid, Float:range)
{
	new Float:x, Float:y, Float:z;
	GetVehiclePos(vehicleid, x, y, z);
	if(IsPlayerInRangeOfPoint(playerid, range, x, y, z))
	{
	    return 1;
	}
	return 0;
}
simply

pawn Код:
stock IsPlayerNearVehicle(playerid, vehicleid, Float:range)
{
    if(!GetVehicleModel(vehicleid)) return 0;
    new Float:x, Float:y, Float:z;
    GetVehiclePos(vehicleid, x, y, z);
    return IsPlayerInRangeOfPoint(playerid, range, x, y, z);
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)