Animation doesn't get applied
#1

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:

Код:
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;
}
Reply


Messages In This Thread
Animation doesn't get applied - by andrejc999 - 02.03.2019, 18:24
Re: Animation doesn't get applied - by Swarn - 02.03.2019, 18:26
Re: Animation doesn't get applied - by andrejc999 - 02.03.2019, 18:33
Re: Animation doesn't get applied - by Swarn - 02.03.2019, 18:49
Re: Animation doesn't get applied - by andrejc999 - 02.03.2019, 18:54
Re: Animation doesn't get applied - by Swarn - 02.03.2019, 19:00
Re: Animation doesn't get applied - by NaS - 02.03.2019, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)