Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help (
/showthread.php?tid=631050)
Help -
se3a - 22.03.2017
hi
how to make recently for robing?? 10min recently to can robing again
and save the recently time to enum
too not quit and login again and get much money from that any help
+rep
Re: Help -
Ayyash - 22.03.2017
Yes, you Can You Want To Create With A Times For Robing You Have Any Coords For Robing if have Please Show The Coords
Re: Help -
se3a - 22.03.2017
Quote:
Originally Posted by Ayyash
Yes, you Can You Want To Create With A Times For Robing You Have Any Coords For Robing if have Please Show The Coords
|
i want just the code i will adding it
and i use CMD and my timer
not coords
need only the recently to cant robing it again only after 10min and save it in enum to be online and finish time recently to can robing it again
Re: Help -
andrejc999 - 22.03.2017
So firstly make a forward for a timer...
So add
Код:
new Robable=0; //basically a variable for robbing, so if it's 1 players can rob the bank and if it's 0 they can't
forward RobbingTimer();
on the top under defines and stuff.
Then find your robbing command, so when someone robs the bank set a timer, and change the Robable variable to 0.
Код:
Robable = 0;
SetTimer("RobbingTimer", 600000, false);
and add
Код:
if(Robable == 0) return SendClientMessage(playerid, COLOR, "You have to wait 10 minutes until you can rob the bank again!");
on top of your command /rob or whatever
and then make a public function
Код:
public RobbingTimer()
{
Robable = 1; Sets the robbing variable to 1 so players can rob a bank or whatever again.
return 1;
}
Hope I helped you if you don't understand me send us your code...
EDIT:This is basically a timer which makes you wait 10 minutes before next robbing...
Re: Help -
Vince - 22.03.2017
When robbed store gettime() + 600 in a variable. On next attempt check if gettime() > value stored in variable.