SA-MP Forums Archive
[SOLVED] Apply animation problem! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Apply animation problem! (/showthread.php?tid=92830)



[SOLVED] Apply animation problem! - Ben147 - 22.08.2009

Why when im doing command with animation i need to type it 2 times then its will works
when i type /crack Nothing happen but when i type /crack again then its working




Re: [NOT SOLVED] Apply animation problem! - Sergei - 22.08.2009

You need to pre-load animations or apply them two times. For example about how to pre-load them look in default vactions.pwn which you get with server package


Re: [NOT SOLVED] Apply animation problem! - Ben147 - 22.08.2009

Thanks you :]


Re: [SOLVED] Apply animation problem! - Cracker - 22.08.2009

But doese it works if im useing 1 preload like for 10 anim?
example:
Code:
	if(!gPlayerAnimLibsPreloaded[playerid]) {
  		PreloadAnimLib(playerid,"10_ANIM");
		gPlayerAnimLibsPreloaded[playerid] = 1;
	}
	return 1;
}
And that all with 10 anims like Smokeing, hiding, arresting etc... Doese it would work? Just for not filling scipt too big
Code:
	// Place a Bomb
  if (strcmp("/bomb", cmdtext, true) == 0) {
		ClearAnimations(playerid);
		OnePlayAnim(playerid, "10_ANIM", "BOM_Plant", 4.0, 0, 0, 0, 0, 0); // Place Bomb
		return 1;
	}
	// Police Arrest
  if (strcmp("/getarrested", cmdtext, true, 7) == 0) {
	   LoopingAnim(playerid,"10_ANIM", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
		 return 1;
  }
	// Laugh
  if (strcmp("/laugh", cmdtext, true) == 0) {
     OnePlayAnim(playerid, "10_ANIM", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
		 return 1;
	}