samperonline
Умник
Нашел интересную систему у вас на форуме, хотелось бы узнать как его использовать чтобы игрок мог включить, и выключить когда захочет.
C++:
if(IsVehicleDrifting(vehicleid)){
SendClientMessage(playerid,-1,"Авто дрифтует");
}else SendClientMessage(playerid,-1,"Авто не дрифтует");
stock IsVehicleDrifting(vehicleid){
new Float:direction, Float:driftAngle, Float:angle, speed;
GetVehicleVelocity(vehicleid, direction, driftAngle, angle);
speed = floatround(136.0*((direction*direction)+(driftAngle*driftAngle)));
direction = atan2(driftAngle, angle);
GetVehicleZAngle(vehicleid, angle);
direction -= 90.0;
if(direction < 0) direction += 360.0;
driftAngle = angle - floatabs(direction);
if(driftAngle > 270.0) driftAngle -= 270.0;
if(driftAngle < -270.0) driftAngle += 270.0;
driftAngle = floatabs(driftAngle);
if(12.0 < driftAngle < 80.0 && speed > 15) return 1;
return 0;
}
