Hi guys.
Код:
public OnPlayerVehicleDamage(playerid,vehicleid, Float:Damage)
{
new vehiclec = GetPlayerVehicleID(playerid);
if(vInfo[vehicleid][BEINDITVA]==true )
{
for(new i; i < MAX_PLAYERS; i++)
{
if(AdminSzoliban[i] != 1 && ModeratorSzoliban[i] != 1)
{
if(GetPlayerVehicleID(i) == vehiclec)
{
if(BOV[i] == 0)
{
if( Damage > 100.0 && Damage < 220.0) //sъlyos
{
TogglePlayerControllable(i, false);
SendClientMessage(i,PIROS,"((Sъlyosan megsйrьltйl!))");
cmd_do(i,"sъlyosan megsйrьlt.");
KocsiOff(vehicleid);
Serult[i] = true;
beszorult[i] = true;
new Float: HP;
GetPlayerHealth(i, HP);
SetPlayerHealth(i, HP-35);
format(serulese[i], 64, "Sъlyos sйrьlйsek a testen");
}
if( Damage > 220.0) //szцrnyethalбs
{
SendClientMessage(i,PIROS,"((Szцrnyethaltбl!))");
cmd_do(i,"szцrnyethalt.");
SetVehicleHealth(vehicleid,253.0);
KocsiOff(vehicleid);
new Float: PosXa, Float: PosYa, Float: PosZa;
GetPlayerPos(i, PosXa, PosYa, PosZa);
SetPlayerPos(i, PosXa, PosYa, PosZa + 0.1);
SetPlayerHealth(i,0.0);
}
if( Damage > 75.0 && Damage < 100.0) //kцnnyebb
{
SendClientMessage(i,PIROS,"((Kцnnyebben megsйrьltйl!))");
cmd_do(i,"kцnnyebben megsйrьlt.");
new Float: HP;
GetPlayerHealth(i, HP);
SetPlayerHealth(i, HP-20);
}
}
else
{
if( Damage > 200.0 && Damage < 260.0) //sъlyos
{
TogglePlayerControllable(i, false);
SendClientMessage(i,PIROS,"((Sъlyosan megsйrьltйl!))");
cmd_do(i,"sъlyosan megsйrьlt.");
KocsiOff(vehicleid);
Serult[i] = true;
beszorult[i] = true;
new Float: HP;
GetPlayerHealth(i, HP);
SetPlayerHealth(i, HP-25);
format(serulese[i], 64, "Sъlyos sйrьlйsek a testen");
}
if( Damage > 260.0 ) //szцrnyethalбs
{
SendClientMessage(i,PIROS,"((Szцrnyethaltбl!))");
cmd_do(i,"szцrnyethalt.");
SetVehicleHealth(vehicleid,253.0);
KocsiOff(vehicleid);
new Float: PosXa, Float: PosYa, Float: PosZa;
GetPlayerPos(i, PosXa, PosYa, PosZa);
SetPlayerPos(i, PosXa, PosYa, PosZa + 0.1);
SetPlayerHealth(i,0.0);
}
if( Damage > 165.0 && Damage < 200.0) //kцnnyebb
{
SendClientMessage(i,PIROS,"((Kцnnyebben megsйrьltйl!))");
cmd_do(i,"kцnnyebben megsйrьlt.");
new Float: HP;
GetPlayerHealth(i, HP);
SetPlayerHealth(i, HP-15);
}
}
}
}
}
}
return 1;
}
If you're using that include, I'd suggest you look at how to update it as many functions are in, that can do this easier than that include.