Blow Up Car
#1

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
Reply
#2

Do you have a way to count the vehicles?
Reply
#3

Quote:
Originally Posted by MenaceX^
Do you have a way to count the vehicles?
Loop them with variable?
Reply
#4

Set vehicle health to 50?
Reply
#5

Try and put this in a command:

pawn Код:
SetVehicleHealth(GetPlayerVehicleID(playerid), 0);
Reply
#6

Quote:
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
Can you talk in English ?

pawn Код:
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;
  }
}
Reply
#7

Danut, i think he want the health at 30 only so when he exits car, it will still explode.
So:
pawn Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)