01.03.2009, 10:04
Hi there, i need it so the car will blow up wen i type /blowcar ad i need it it will blow up wen im in the car and i exit i still want the car to blow up
Originally Posted by MenaceX^
Do you have a way to count the vehicles?
|
SetVehicleHealth(GetPlayerVehicleID(playerid), 0);
Originally Posted by KyleLyndonSmith
Hi there, i need it so the car will blow up wen i type /blowcar ad i need it it will blow up wen im in the car and i exit i still want the car to blow up
|
if(strcmp(cmd, "/blowup", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,1);
SetVehicleHealth(GetPlayerVehicleID(playerid),30);//to explode it after 5 seconds
}
else
{
SendClientMessage(playerid,COLOR_WHITE," You must be in a CAR !");
return 1;
}
}
if(strcmp(cmd, "/blowup", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_WHITE," You must be in a CAR !");
return 1;
}
SetVehicleHealth(GetPlayerVehicleID(playerid),30);//to explode it after 5 seconds
return 1;
}