Need a little help here
#3

Quote:
Originally Posted by O_x
1.How can i make something that if i pressed ctrl once and spawned a car i won't be able to spawn another one
for an amount of time?cuz ppl just tapping ctrl and it lags the server and spawns tons of cars O.o
pawn Код:
new tick;
pawn Код:
YOURFUNCTIONTOSPAWNVEHICLES() // e.g OnPlayerKeyStateChange
{
  if(GetTickCount() < tick) return SendClientMessage(playerid, COLOR, "You'll need to wait to spawn another vehicle!");
  // your stuff to spawn vehicle...
  tick = GetTickCount() + 10000; // change 10000 for the amount of time in ms.
  return 1;
}
Reply


Messages In This Thread
Need a little help here - by [XST]O_x - 02.05.2010, 07:01
Re: Need a little help here - by [XST]O_x - 02.05.2010, 20:20
Re: Need a little help here - by Miguel - 02.05.2010, 20:36
Re: Need a little help here - by [XST]O_x - 02.05.2010, 20:58
Re: Need a little help here - by Torran - 02.05.2010, 21:39
Re: Need a little help here - by [XST]O_x - 02.05.2010, 21:43

Forum Jump:


Users browsing this thread: 1 Guest(s)