Spawn andrespawn cars. -
bartje01 - 07.02.2010
Hi guys. I am looking for a script that does the following:
I want that a car spawns every 15 minutes on this pos: 2505.7378,-1694.3157,13.3312,358.3196
But I also want that it stays for 3 minutes.
So yu have 3 minutes time to get the car, else you have to wait 15 minutes till it spawns again. How can I do this?
Regards
Re: Spawn andrespawn cars. -
bartje01 - 07.02.2010
No one knows how to do this?
Re: Spawn andrespawn cars. -
mansonh - 07.02.2010
Learn to script:
http://forum.sa-mp.com/index.php?topic=2750.0
https://sampwiki.blast.hk/wiki/Main_Page
And
Script Request Thread:
http://forum.sa-mp.com/index.php?topic=144062.0
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 12 hours old.
I really shouldn't give this too you especially as its the wrong section, and you just bumped.
However, as I am feeling nice, I will give you a basic version.
new cartimervehicle;
public OnGamemodeInit()
{
SetTimer("CarTimerSpawn",900000,false);
}
forward CarTimerSpawn()
public CarTimerSpawn()
{
cartimerdrop = CreateVehicle(400, 2505.7378,-1694.3157,13.3312,0,0,0);
SetTimer("CarTimerDestroy",180000,false);
}
public CarTimerDestroy()
{
DestroyVehicle(cartimerdrop);
SetTimer("CarTimerSpawn",900000,false);
}
Re: Spawn andrespawn cars. -
bartje01 - 07.02.2010
Thanks for the script.
And sorry for bumping
Re: Spawn andrespawn cars. -
bartje01 - 07.02.2010
But how to fix these?
Код:
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(760) : error 001: expected token: ";", but found "public"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(762) : error 017: undefined symbol "cartimerdrop"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(762) : warning 202: number of arguments does not match definition
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(765) : warning 235: public function lacks forward declaration (symbol "CarTimerDestroy")
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(767) : error 017: undefined symbol "cartimerdrop"
C:\Users\Bart\Desktop\samp server\gamemodes\bartmarc.pwn(2302) : warning 203: symbol is never used: "cartimervehicle"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: Spawn andrespawn cars. -
mansonh - 07.02.2010
new cartimervehicle;
public OnGamemodeInit()
{
SetTimer("CarTimerSpawn",900000,false);
}
forward CarTimerSpawn();
public CarTimerSpawn()
{
cartimervehicle= CreateVehicle(400, 2505.7378,-1694.3157,13.3312,0,0,0);
SetTimer("CarTimerDestroy",180000,false);
}
forward CarTimerDestroy();
public CarTimerDestroy()
{
DestroyVehicle(cartimervehicle);
SetTimer("CarTimerSpawn",900000,false);
}
Re: Spawn andrespawn cars. -
bartje01 - 07.02.2010
can you please add it to my gamemode? When I do it it keeps giving errors
http://pastebin.com/m75470f81 Thats my gamemode.
I hope you can do it for me.
Regards
Re: Spawn andrespawn cars. -
mansonh - 07.02.2010
http://pastebin.com/m2682b0cd
I tried compiling, its fine.
Re: Spawn andrespawn cars. -
bartje01 - 07.02.2010
Quote:
Originally Posted by mansonh
|
damn. Thanks man. It is working for me too now.
You are great. And it really seems I have to learn many things :P