26.10.2014, 13:53
pawn Код:
GetPosBehindVehicle(482, Poz[0], Poz[1], Poz[2]);
What you should be doing is replacing the '482' with the vehicle ID of the closest vehicle to the player.
Quote:
pawn Код:
|
pawn Код:
if(newkeys & 6) // KEY LMB
{
if(SvercaMaterijale[playerid] == 2)
{
new Float:Poz[3];
GetPosBehindVehicle(GetClosestVehicle(playerid), Poz[0], Poz[1], Poz[2]);
if(PI[playerid][Clan] == 7)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, Poz[0], Poz[1], Poz[2]))
{
DisablePlayerCheckpoint(playerid);
SvercaMaterijale[playerid] = 3;
SetPlayerCheckpoint(playerid, 1263.2574,-2029.8651,59.3268, 3.0);
if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
}
else return SCM(playerid, GREY, "You're not behind vehicles trunk.");
}
}
}