SA-MP Forums Archive
Animations help, please! - 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: Animations help, please! (/showthread.php?tid=60858)



Animations help, please! - Sideways - 07.01.2009

Hey, I'm all new to scripting and am experimenting with anim's to create a filming server, but i require your help!
I have 2 problems.

1. Whenever I type an anim in a vehicle, I get a message saying I cannot use anims in vehicles! is there a way to fix this please? I am using this filterscript:
http://forum.sa-mp.com/index.php?topic=65919.0

2. When I use an animation that requires sitting down on a solid object, the player is moved accordingly and cannot sit on the object! is there a way to make all objects non-solid when an animation is used? I have seen this working on various scripts such as LS-RP and many other proffesional servers, please help!

I appretiate all help, thank you.


Re: Animations help, please! - Sideways - 08.01.2009

Sorry to bump thread but, anyone!?


Re: Animations help, please! - Danut - 08.01.2009

1. Search in that FS , for IsPlayerInAnyVehicle , and post here the code
2. Dunno


Re: Animations help, please! - Sideways - 08.01.2009

Код:
if(!strcmp(cmd, "/animbaseball", true))
	{
		if(IsPlayerInAnyVehicle(playerid) == 1) return SendClientMessage(playerid,COLOR_RED," Animations are inaccessible in transport!");

		tmp = strtok(cmdtext, idx);
		animid = strval(tmp);
		if(!strlen(tmp)||animid < 1 || animid > 11)
		{
			SendClientMessage(playerid,COLOR_SYSTEM," Syntax: /animbaseball [1-11]");
			return 1;
		}
		switch(animid)
		{
			case 1: ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1);
			case 2: ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1);
			case 3: ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1);
			case 4: ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1);
			case 5: ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1);
			case 6: ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1);
			case 7: ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1);
			case 8: ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1);
			case 9: ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1);
			case 10: ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1);
			case 11: ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1);
		}
		return 1;
	}
The IsPlayerInAnyVehicle rule is applied to every animation, and thats the only place I can find that piece of writing.


Re: Animations help, please! - afei - 13.01.2009

Код:
if(IsPlayerInAnyVehicle(playerid) == 1) return SendClientMessage(playerid,COLOR_RED," Animations are inaccessible in transport!");
Remove the line and you should be fine. Just wondering why do you want to use a baseball anim inside of a car.


Re: Animations help, please! - Sideways - 13.01.2009

Quote:
Originally Posted by afei™
Код:
if(IsPlayerInAnyVehicle(playerid) == 1) return SendClientMessage(playerid,COLOR_RED," Animations are inaccessible in transport!");
Remove the line and you should be fine. Just wondering why do you want to use a baseball anim inside of a car.
Thank you, I'll test it in a second, for your question I was just using the baseball anim as an example, because every anim has the same layout of code, thanks again.


Re: Animations help, please! - ICECOLDKILLAK8 - 13.01.2009

nvm, do what afei said


Re: Animations help, please! - [DRD]Rodney - 08.08.2010

2. When I use an animation that requires sitting down on a solid object, the player is moved accordingly and cannot sit on the object! is there a way to make all objects non-solid when an animation is used? I have seen this working on various scripts such as LS-RP and many other proffesional servers, please help!

Please help I got same problem