CreateVehicle - 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: CreateVehicle (
/showthread.php?tid=191433)
CreateVehicle -
barneystinson - 19.11.2010
Hey guys just wondering is it possible when using the command:
CreateVehicle(541, X+4, Y+4, Z + 3.0, Angle + 90.0, -1, -1, -1);
So you dont respawn the vehicle once it has blown as i was planning on using this
to create a vehicle shop which is useless if your paying for a car that respawns non stop lol
Re: CreateVehicle -
Lorenc_ - 19.11.2010
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
Add some if statements to it like If(rentcar == 1) then under that
create the vehicle again at the players position.
Re: CreateVehicle -
barneystinson - 19.11.2010
Ahh okay ill have a look at doing this now thanks
although instead of recreating the vehicle at players pos i will be able to remove it completely if its been blown once?
I dont want it so when you buy one car you can keep using it even if blown once or twice
Re: CreateVehicle -
PowerPC603 - 19.11.2010
Check out the DestroyVehicle command:
https://sampwiki.blast.hk/wiki/DestroyVehicle
Pseudo-code:
Код:
public OnVehicleDeath(vehicleid, killerid)
{
if (rentcar == 1)
{
DestroyVehicle(vehicleid);
}
return 1;
}
Re: CreateVehicle -
barneystinson - 20.11.2010
Hmm i really dont get how to do that though lol as im using Garsino Car Menu just changing it so that there is less cars and a checkpoint to get the cars instead of command.
Re: CreateVehicle -
barneystinson - 20.11.2010
Okay so i managed to get vehicles to stop spawning but it stopped every vehicle from spawning i tried using
AddStaticVehicle/Ex/CreateVehicle Still wouldnt spawn i added this also
for(new i = 0; i < MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
}
Still nothing, here is the code i was using to create vehicles
http://pastebin.com/WxfLHsPv
I added DestroyVehicle(vehicleid); under OnVehicleDeath but well idk how to add if statements unders OnVehicleDeath as everything i was trying would give me similar results to this
function heading differs from prototype
Any help would be Awsome!
Re: CreateVehicle -
barneystinson - 20.11.2010
Bumpy bump
Re: CreateVehicle -
Biesmen - 20.11.2010
Barney, read stickies:
Quote:
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 48 hours old, and it needs to have useful information about your problem.
|
At your question, I have no idea what you mean.
Re: CreateVehicle -
barneystinson - 20.11.2010
Lol why bother posting that its not like i bumped it 10 minutes later... and ive read on other posts 12 hours/24 hours now 48..