Vehicle destroy
#1

Hi. I want to do, that when player leave car, it will destroy. Here I have code. It works, but vehicle wont destroy, but respawning...

Код:
 if( oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT && IsValidVehicle(veho[playerid]))
    {
        timer[ playerid ] = SetTimerEx( "destroytimer", 120000, false, "i", playerid );
    }
Код:
forward destroytimer( playerid );
public destroytimer( playerid )
{
    DestroyVehicle(veho[playerid]);
    return 1;
}
Reply
#2

destroy vehicles mean's its self re-spawning use givevehiclehealth
Код:
new vID = GetPlayerVehicleID(playerid);
	GetVehiclePos(vID, x, y, z), SetVehicleHealth(vID, 0), CreateExplosion(x, y, z, 12, 20);
Reply
#3

Quote:
Originally Posted by Xtra
Посмотреть сообщение
destroy vehicles mean's its self re-spawning use givevehiclehealth
Код:
new vID = GetPlayerVehicleID(playerid);
	GetVehiclePos(vID, x, y, z), SetVehicleHealth(vID, 0), CreateExplosion(x, y, z, 12, 20);
Still respawning :/
Reply
#4

Still need help :S
Reply
#5

Quote:
Originally Posted by ,TomY'
Посмотреть сообщение
Still need help :S
Код:
  new vehicleid = GetPlayerVehicleID(playerid);
    SetVehicleHealth(vehicleid, 5);
it will make your vehicle start burning at the very least , ( is there something in your script which is making the vehicle respawn ? )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)