-
Notifications
You must be signed in to change notification settings - Fork 29
AntiVehicleSpawn
Nexius edited this page Oct 14, 2024
·
46 revisions
const VehicleDestroyed = 136;
IRPC:VehicleDestroyed(playerid, BitStream:bs)
{
new vehicleid;
BS_ReadUint16(bs, vehicleid);
if (GetVehicleModel(vehicleid) < 400) {
return 0;
}
return OnVehicleRequestDeath(vehicleid, playerid);
}
forward OnVehicleRequestDeath(vehicleid, killerid);
public OnVehicleRequestDeath(vehicleid, killerid)
{
new Float:health;
GetVehicleHealth(vehicleid, health);
if (health >= 250.0) {
return 0;
}
return 1;
}
const VehicleDestroyed = 136;
IRPC:VehicleDestroyed(playerid, BitStream:bs)
{
new vehicleid;
BS_ReadUint16(bs, vehicleid);
if (GetVehicleModel(vehicleid) < 400) {
return 0;
}
return OnVehicleRequestDeath(vehicleid, playerid);
}
forward OnVehicleRequestDeath(vehicleid, killerid);
public OnVehicleRequestDeath(vehicleid, killerid)
{
new Float:health, Float:depth, Float:vehicledepth;
GetVehicleHealth(vehicleid, health);
if (health >= 250.0
&& !CA_IsVehicleInWater(vehicleid, depth, vehicledepth)
) {
return 0;
}
return 1;
}
- Refer to BrunoBM16's RPC and Packet lists