25.08.2011, 05:57
Is there a way that i can instantly explode a car?!
Thanks!
Thanks!
new Float:x, Float:y, Float:z;
GetVehiclePos(GetPlayerVehicleID(playerid), x,y,z);
CreateExplosion(x,y,z,0, 10);
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(explosion == 0)
{
return 1;
}
else if(explosion == 1)
{
PutPlayerInVehicle(playerid, vehicleid, GetPlayerVehicleSeat(playerid));
SendClientMessage(playerid,COLOR_RED,"You Cannot Leave Your Car While Bomb Armed!");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Type /Disarm Bomb To Disarm it!");
}
return 1;
}
Note: Sometimes the result can be 128 which is an invalid seat ID. Circumstances of this are not yet known, but it is best to discard information when returned seat number is 128.
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(explosion == 0)
{
return 1;
}
else if(explosion == 1)
{
new iSeat = GetPlayerVehicleSeat(playerid);
if(iSeat == 0)
{
PutPlayerInVehicle(playerid, vehicleid, GetPlayerVehicleSeat(playerid));
SendClientMessage(playerid,COLOR_RED,"You Cannot Leave Your Car While Bomb Armed!");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Type /Disarm Bomb To Disarm it!");
}
}
return 1;
}