SA-MP Forums Archive
Something wrong here? - 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: Something wrong here? (/showthread.php?tid=126992)



Something wrong here? - GMusicOn - 11.02.2010

Код:
dcmd_bomb(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 97.2593,1920.5094,18.1596))
	  	{
	  	  if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"ERROR: You can't plant a bomb when your in a vehicle!");
	  	  if(GateAttack == 2) return	SendClientMessage(playerid, COLOR_RED, "ERROR: The gate has blown up!");
				if(GetPlayerTeam(playerid) == 2) SendClientMessage(playerid, COLOR_RED, "ERROR: You can open/close the gate via the control center!"); 
				ApplyAnimation(playerid,"BOMBER","BOM_Plant",5.0,0,1,1,0,0);
				bombtimer = SetTimerEx("GateBomb", 3000, true,"d",playerid);
				SendClientMessage(playerid, COLOR_YELLOW, "Placing a bomb takes 3 seconds!"); 
  		}
  		
	return 1;
}
Problem is that everything works fine except the ApplyAnimation.
First time using the command nothing happens.
Second time it works like a charm, it does it all the way.
Does the animation needs to be "preloaded" or something like that?


Re: Something wrong here? - Correlli - 11.02.2010

Quote:
Originally Posted by GMusicOn
Does the animation needs to be "preloaded" or something like that?
Yes, there's an animation filterscript in the samp-server-package. Check it out.


Re: Something wrong here? - GMusicOn - 11.02.2010

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by GMusicOn
Does the animation needs to be "preloaded" or something like that?
Yes, there's an animation filterscript in the samp-server-package. Check it out.
Thank you, will chek it out.