02.05.2010, 20:36
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;
}