13.04.2014, 08:37
Hello, how would I check if a player is in at the bonnet and the boot of a vehicle, I have seen other functions made by users but I didn't know if they were outdated forms of doing it. Any help is much appreciated.
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(/*YOUR, Vehicle ID (e.g GetClosestVehicle stock u can make)*/ vehx, vehy, vehz);
if(IsPlayerInRangeOfPoint(playerid, 3.0, vehx, vehy, vehz))
{
/* Stuff to Open Bonnet */
SendClientMessage(playerid,0xFFFFFFFF,"You have opened the bonnet");
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"You are not close enough to the car!");
}
Something like this>
pawn Код:
|