PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys == KEY_WALK)
{
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID, Float:X, Float:Y, Float:Z, Float:Angle;
GetPlayerPos(playerid, X, Y, Z);
VehicleID = GetPlayerVehicleID(playerid);
GetVehicleZAngle(VehicleID, Angle);
SetVehiclePos(VehicleID, X, Y, Z);
SetVehicleZAngle(VehicleID, Angle);
SetVehicleHealth(VehicleID,1000.0);
}
}
return 1;
}
Made some modification and here you go.