[SOLVED] DestroyVehicle after the explosion just in DM ! -
Yaszine - 20.12.2010
Hey all, I need really your help in this function
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
DestroyVehicle(vehicleid);
return 1;
}
I need only if player in /dm, and the vehicle explode it will not re-spawn, it will destroy but the other cars out of /dm will re-spawn when it explode !
Thanks at first
Re : DestroyVehicle after it die but in DM ! -
Yaszine - 20.12.2010
!bump
Re: DestroyVehicle after it die but in DM ! -
Face9000 - 20.12.2010
Your dm code?
Re: DestroyVehicle after it die but in DM ! -
Jefff - 20.12.2010
init
pawn Код:
DM_Cars[0] = AddStaticVehicleEx(... // first car
...
...
...
DM_Cars[1] = AddStaticVehicleEx(... // last dm car
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
if(DM_Cars[0] <= vehicleid <= DM_Cars[1])
DestroyVehicle(vehicleid);
return 1;
}
Re : DestroyVehicle after it die but in DM ! -
Yaszine - 21.12.2010
I have, if player use /dm it will put him in Bloodring, and teleportation to the area !
If he /dmq it will spawn him and destroy his car !
pawn Код:
if(strcmp(cmdtext, "/dm", true) == 0)
{
new Float: tmp_A;
GetPlayerFacingAngle(playerid, tmp_A);
SetPVarInt(playerid, "d_Car", CreateVehicle(504, -1510.7020, 1014.6202, 1037.8568, tmp_A, -1, -1, -1));
SetPlayerPos(playerid, -1510.7020,1014.6202,1037.8568);
SetPlayerInterior(playerid, 15);
LinkVehicleToInterior(GetPVarInt(playerid, "d_Car"), 15);
PutPlayerInVehicle(playerid, GetPVarInt(playerid, "d_Car"), 0);
Bloodring[playerid]=1;
Dzone[playerid]=1;
return 1;
}
pawn Код:
if (strcmp(cmdtext, "/dmq", true) == 0)
{
new lastcar;
lastcar = GetPlayerVehicleID(playerid);
DestroyVehicle(lastcar);
Dzone[playerid] = 0;
Bloodring[playerid]=0;
SpawnPlayer(playerid);
RemovePlayerFromVehicle(playerid);
return 1;
}
Re : DestroyVehicle after it die but in DM ! -
Yaszine - 21.12.2010
Anyone ?!
Re: DestroyVehicle after it die but in DM ! -
XePloiT - 21.12.2010
so save the cars info in a file and laod it.. into dmCars[MAX_VEHICLES];
and check if the car is dm car... if(dmCars[vehid]==1) then it'll destroy them...
Re : DestroyVehicle after it die but in DM ! -
Yaszine - 21.12.2010
No, I have been found an answer but I forgot it
Look again, it just CreatVehicle not AddStaticVehicle !
Re : DestroyVehicle after it die but in DM ! -
Yaszine - 21.12.2010
BUMP !
Re : DestroyVehicle after it die but in DM ! -
Yaszine - 22.12.2010
Please !