How can i make /v spawned vehs. dont respawn
#1

O hei der!
Im using Simon's debug mode "DEBUG_05c" and i would like to know how to make the /v spawned vehicles dont repsawn. Because if i /v and blow the car up... it respawns at the place where i spawned it. I tried to fix it on my own but looks like i dont know how to. So please help :>
Reply
#2

P: hei

OnVehicleSpawn DestroyVehicle.
Reply
#3

Quote:
Originally Posted by Mikep.
P: hei

OnVehicleSpawn DestroyVehicle.
loloz mike hei der P::P Thanks i'll try

Off Topic. Looks like you will have to make Mike's English Lessons here too :P:P
Quote:
Originally Posted by Mikep.
No grills here, there are some good looking BBQs though.

Why can nobody spell on this forum :/
Reply
#4

P:

OnVehicleSpawn should only be called when I vehicle REspawns, i'm not sure though, try it and tell me if it works.
Reply
#5

OnVehicleSpawn is called when a vehicle respawns. When you create the vehicle via /v, save the id and when It's destroyed ingame, check if the id matches the one in OnVehicleSpawn and then destroy the vehicle with DestroyVehicle
Reply
#6

Doing what Mike said over msn P: Hope it works, BRB testing
Reply
#7

I had that issue, I fixed it by doing this:

pawn Код:
new ShouldntVehicleRespawn[MAX_VEHICLES];

//Whenever you use your /v command, at the creating the vehicle bit
new vehicleid = CreateVehicle(....);
ShouldntVehicleRespawn[vehicleid] = 1;

public OnVehicleSpawn(vehicleid)
{
  if(ShouldntVehicleRespawn[vehicleid] == 1) DestroyVehicle(vehicleid);
  return 1;
}
Problem solved.
Reply
#8

Naa Thanks to Mike :>
Код:
public OnVehicleSpawn(vehicleid)
{
	DestroyVehicle(vehicleid);
  return 1;
}
short and easy :>
Reply
#9

True, but that means ALL vehicles don't respawn, not just the ones that you spawn with /v.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)