23.06.2018, 08:17
I used a loop for adding objects, then i used if(IsPlayerInRangeOfObject) for making the robbery command work
after that, I used loop for different making objects for EXAMPLE
then the robbery command
then the textdraws
Then, at the END,
SafeRecentlyRobbed[i] = 1;
then a 5 min timer, then the saferecentlyrobbed will be 0;
But it's not adding a COOLDOWN to THAT PARTICULAR SHOP/SAFE, it's adding cooldown to EVERY SAFE present in the ENUMS
after that, I used loop for different making objects for EXAMPLE
Код:
ENUM { POSES LIKE XYZ } new SafeMoney[][MoneyOfSafe] = { {382.519470, -56.520069, 1000.847290, 0.000000, 0.000000, -3.399998},
Код:
{ if(SafeRecentlyRobbed[playerid] == 1) { format(str, 128, "{FF0000}[ERROR] {FFFFFF}This store has recently been robbed, please wait before robbing it again."); return SendClientMessage(playerid, -1, str); } if(SafeBeingRobbed[playerid] == 1) return SendClientMessage(playerid, -1, "{FF0000}[ERROR] {FFFFFF}You're already robbing a safe."); for(new i = 0; i < sizeof(StoreSafeMoney); i++) { if (IsPlayerInRangeOfPoint(playerid, 2.0, SafeMoney[i][SafeX], SafeMoney[i][SafeY], SafeMoney[i][SafeZ])) { SetPlayerLookAt(playerid, SafeMoney[i][SafeX], SafeMoney[i][SafeY]); ClearAnimations(playerid); SetTimer("RobberyStart", 0, false);
Then, at the END,
SafeRecentlyRobbed[i] = 1;
then a 5 min timer, then the saferecentlyrobbed will be 0;
But it's not adding a COOLDOWN to THAT PARTICULAR SHOP/SAFE, it's adding cooldown to EVERY SAFE present in the ENUMS