Spawn andrespawn cars.
#1

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
Reply
#2

No one knows how to do this?
Reply
#3

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);
}
Reply
#4

Thanks for the script.
And sorry for bumping
Reply
#5

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.
Reply
#6

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);
}
Reply
#7

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
Reply
#8

http://pastebin.com/m2682b0cd
I tried compiling, its fine.
Reply
#9

Quote:
Originally Posted by mansonh
http://pastebin.com/m2682b0cd
I tried compiling, its fine.
damn. Thanks man. It is working for me too now.
You are great. And it really seems I have to learn many things :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)