Animations help, please!
#1

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.
Reply
#2

Sorry to bump thread but, anyone!?
Reply
#3

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

Код:
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.
Reply
#5

Код:
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.
Reply
#6

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.
Reply
#7

nvm, do what afei said
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)