02.03.2019, 18:24
So I made a robbing system for ATMs and the animation doesn't get applied for some reason.
I tried setting it twice but still nothing so I decided to make a command just for the animation.
I have to execute it twice before it starts working. Why?
Here's the code:
I tried setting it twice but still nothing so I decided to make a command just for the animation.
I have to execute it twice before it starts working. Why?
Here's the code:
Код:
CMD:robbankomat(playerid, params[]) { if(robanjeBankomata[playerid] == 1) return SCM(playerid, COLOR_WHITE, "* Vec robate."); if(robanjeTimer[playerid] > 0) return SCM(playerid, COLOR_WHITE, "* Morate sacekati 20 minuta od proslog robanja."); if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_WHITE, "{007AF4}[BK] {FFFFFF}Niste kod bankomata!"); for(new b=0, s=MAX_BANKOMAT;b<s;b++) { if(IPP(playerid, 1, bankomatInfo[b][bX], bankomatInfo[b][bY], bankomatInfo[b][bZ])) { if(bankomatInfo[b][robTimer] > 0) return SCM(playerid, COLOR_WHITE, "* Sacekajte malo."); robanjeBankomata[playerid] = 1; pInfo[playerid][pBankomatRob] = 1200; robanjeTimer[playerid] = 300; bankomatInfo[b][robTimer] = 1200; ClearAnimations(playerid, 1); ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Loop", 4.0, 1, 0, 0, 1, 0); PI[playerid][pWl] = 6; return 1; } } SCM(playerid, COLOR_WHITE, "{007AF4}[BK] {FFFFFF}Niste kod bankomata!"); return 1; }