28.06.2011, 05:26
(
Последний раз редактировалось Jack_Leslie; 28.06.2011 в 08:23.
)
Fixed
new lastcar = P_LastVeh[playerid]; new Float:lcX, Float:lcY, Float:lcZ; GetVehiclePos(lastcar, lcX, lcY, lcZ); if(!IsPlayerInRangeOfPoint(playerid, 2, lcX, lcY, lcZ))
new P_LastVeh[MAX_PLAYERS] = (-1);
if(GetPlayerState(playerid) == 2)
{
P_LastVeh[playerid] = GetPlayerVehicleID(playerid);
return 1;
}
if(strcmp(x_nr,"hood",true) == 0)
{
new lastcar = P_LastVeh[playerid];
new Float:lcX, Float:lcY, Float:lcZ;
GetVehiclePos(lastcar, lcX, lcY, lcZ);
if(IsPlayerInRangeOfPoint(playerid, 2, lcX, lcY, lcZ))
{
if(GetPVarInt(playerid, "Hood") == 0)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,hood,trunk,objective);
SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,trunk,objective);
SetPVarInt(playerid, "Hood", 1);
}
else if(GetPVarInt(playerid, "Hood") == 1)
{
GetVehicleParamsEx(veh,engine,lights,alarm,doors,hood,trunk,objective);
SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,trunk,objective);
SetPVarInt(playerid, "Hood", 0);
}
return 1;
}
else {
SendClientMessage(playerid,COLOR_WHITE,"[Vehicle Control] You're not in range of your last vehicle!");
return 1;
}
}
how about this
pawn Код:
coz i kinda remember something like when you get a empty vehicles pos it returns the pos where it spawned not where it is now not 100% on that though |