Код
new fuckshoter[MAX_PLAYERS][3];
В public OnPlayerConnect(playerid); добавляем:
Код
fuckshoter[playerid][0]=0; fuckshoter[playerid][1]=0; fuckshoter[playerid][2]=0;
В конец мода добавляем:
Код
stock ScanPlayerDosRaket(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(fuckshoter[playerid][1] == 1)
{
fuckshoter[playerid][1] = 0;
new Float:Velocity231[3];
GetVehicleVelocity(fuckshoter[playerid][0], Velocity231[0], Velocity231[1], Velocity231[2]);
if(Velocity231[0]>2 || Velocity231[1]>2 || Velocity231[2]>2 || Velocity231[0]<-2 || Velocity231[1]<-2 || Velocity231[2]<-2)
{
SetVehicleHealth(fuckshoter[playerid][0], 0);
if(fuckshoter[playerid][2]<8) fuckshoter[playerid][2]++; else
{
fuckshoter[playerid][2] = 0;
new nameqepinru3[MAX_PLAYER_NAME],string[180];
GetPlayerName(playerid, nameqepinru3, sizeof(nameqepinru3));
format(string,sizeof(string),"<Warning> %s[%d]: Возможно Car Airbreak",nameqepinru3,playerid);
ABroadCast(0xFF0000AA,string,1);
}
}
}
new Float:Velocity23[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity23[0], Velocity23[1], Velocity23[2]);
if(Velocity23[0] == 0 && Velocity23[1] == 0 && Velocity23[2] == 0)
{
fuckshoter[playerid][0] = GetPlayerVehicleID(playerid);
if(fuckshoter[playerid][1] == 1) fuckshoter[playerid][1] = 2;
if(fuckshoter[playerid][1] == 0) fuckshoter[playerid][1] = 1;
}
else fuckshoter[playerid][0]=0, fuckshoter[playerid][1]=0;
}
return true;
}
в OnPlayerUpdate(playerid); добавляем:
Код
ScanPlayerDosRaket(playerid);