19.07.2010, 17:35
Concept:
Have a player type a command, "getcar", and in 2 minutes a car spawns on(near) their position.
Now I'm good, until I get to the timer part, I've never been familiar with timers, I spent a few hours now looking at other timers, and searching wiki, but no luck.
What I got:
And Basically, I tried to put this into it:
But I have no clue how to make it so that the timer stops the car from spawning for 2 minutes
Have a player type a command, "getcar", and in 2 minutes a car spawns on(near) their position.
Now I'm good, until I get to the timer part, I've never been familiar with timers, I spent a few hours now looking at other timers, and searching wiki, but no luck.
What I got:
pawn Код:
if(strcmp(cmd, "/getcar", true) == 0)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SendClientMessage(playerid, COLOR_HELP, "A car will be to your position in 2 Minutes");
// DELAY FOR CAR SPAWNING (2 Minutes) HERE
new carid = CreateVehicle(410, X,Y+5,Z+1, 0.0, 6, 6, 15);
CreatedCars[CreatedCar] = carid; // Part of la-rp base
CreatedCar ++; // Part of la-rp base
return 1;
}
pawn Код:
new CarTimer = SetTimer ("CarTimer", 120000,1);