help me
#1

How to spawn vehicles that are damaged? which has black smoke coming from bunet and the bunnets are crushed(front of car)
Reply
#2

I don't understand u.. u mean, a respawn cmd?
Reply
#3

no im working on a accident map and i want the cars that was hit low on hp so...when filterscipt starts the cars spawn with LOW HP.
Reply
#4

Just use SetVehicleHealth() on them? Set it to something low.

As the Wiki says, it will set on fire when the value is below 250, so maybe around 300?
Reply
#5

Код:
public OnVehicleSpawn(vehicleid)
Put your Code in here
like
Код:
SetVehicleHealth(vehicleid, health);
or
Код:
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
and maybe you want to open the bonnet, then you'll have to use:

Код:
SetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
Reply
#6

Use GetVehicleHealth, then once respawned, set it to the same damage it was before.
Reply
#7

i dont understand.
i want this to be damaged(BOTH)
pawn Код:
AddStaticVehicle(415, -1551, 727, 7, 259.99694824219, 6, 0); //Cheetah
    AddStaticVehicle(402, -1548, 727, 7, 45.999755859375, 79, 0); //Victon
]
Reply
#8

Код:
//At the top of your script
new DamagedCheetah;
new DamagedVicton;
Код:
//Under OnGameModeInit()
DamagedCheetah = CreateVehicle(415, -1551, 727, 7, 259.99694824219, 6, 0, 1);
DamagedVicton = CreateVehicle(402, -1548, 727, 7, 45.999755859375, 79, 0, 1);
Код:
//Under OnVehicleSpawn(vehicleid)
if(vehicleid==DamagedCheetah || vehicleid==DamagedVicton)
{
SetVehicleHealth(vehicleid, 120.0);//Change it to the amount you wish to have ;)
new panels,doors,lights,tires,engine,lights2,alarm,doors2,bonnet,boot,objective;
GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
GetVehicleParamsEx(vehicleid,engine,lights2,alarm,doors2,bonnet,boot,objective);
UpdateVehicleDamageStatus(vehicleid, 4, 6, 3, 10);//Change it if you want to .
SetVehicleParamsEx(vehicleid,engine,lights2,alarm,doors2,1,boot,objective);
}
Did not tested yet.

I wrote it down immediately
Reply
#9

Probably a Respawn Command Without fixing the vehicles?
Reply
#10

I get this error when i use that code
Код:
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(69) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(70) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(84) : error 017: undefined symbol "GetVehicleDamageStatus"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(85) : error 017: undefined symbol "GetVehicleParamsEx"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(86) : error 017: undefined symbol "UpdateVehicleDamageStatus"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(87) : error 017: undefined symbol "SetVehicleParamsEx"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "objective"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "boot"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "bonnet"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "doors2"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "alarm"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "lights2"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "engine"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "tires"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "lights"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "doors"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83) : warning 203: symbol is never used: "pannels"
C:\Documents and Settings\Abraham2\Desktop\Abe\filterscripts\ACCIDENT.pwn(83 -- 89) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Heres what i have:
pawn Код:
//On Top:
new DamagedCheetah;
new DamagedVictom;

//under public OnFilterScriptInit
    DamagedCheetah = CreateVehicle(415, -1551, 727, 7, 259.99694824219, 6, 0); //Cheetah
    DamagedVictom = CreateVehicle(402, -1548, 727, 7, 45.999755859375, 79, 0); //Victom

//Under public OnVehicleSpawn(vehicleid)
    if(vehicleid==DamagedCheetah || vehicleid==DamagedVictom)
    {
    SetVehicleHealth(vehicleid, 120.0); //Change This to the amount you wish to have.
    new pannels,doors,lights,tires,engine,lights2,alarm,doors2,bonnet,boot,objective;
    GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
    GetVehicleParamsEx(vehicleid,engine,lights2,alarm,doors2,bonnet,boot,objective);
    UpdateVehicleDamageStatus(vehicleid, 4, 6, 3, 10);//Change it if you want to .
    SetVehicleParamsEx(vehicleid,engine,lights2,alarm,doors2,1,boot,objective);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)