21.06.2015, 18:36
use this:
and use it like this in dialog:
PHP код:
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 true;
else return false;
}
PHP код:
IsPlayerNearVehicle(playerid, carid+PreVehicle, 5.0);