Blow Up Car - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Blow Up Car (
/showthread.php?tid=67394)
Blow Up Car -
KyleLyndonSmith - 01.03.2009
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
Re: Blow Up Car -
MenaceX^ - 01.03.2009
Do you have a way to count the vehicles?
Re: Blow Up Car -
Rks25 - 01.03.2009
Quote:
Originally Posted by MenaceX^
Do you have a way to count the vehicles?
|
Loop them with variable?
Re: Blow Up Car -
Rks25 - 01.03.2009
Set vehicle health to 50?
Re: Blow Up Car -
Robbin237 - 01.03.2009
Try and put this in a command:
pawn Код:
SetVehicleHealth(GetPlayerVehicleID(playerid), 0);
Re: Blow Up Car -
Danut - 01.03.2009
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;
}
}
Re: Blow Up Car -
Rks25 - 01.03.2009
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;
}