SA-MP Forums Archive
Convert a animations fs(0.3a->0.3b) - 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: Convert a animations fs(0.3a->0.3b) (/showthread.php?tid=170556)



(0.3a->0.3b)a animations fs need help!!! - kevinchui828 - 23.08.2010

Versions before 0.3b, ApplyAnimation command looks like this
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time)
But in 0.3b
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
I compiled the animation fs for 0.3b
But animations cannot be synced as they only showed on the client of the player who typed the animation command
So, I tried to edit the animation fs to make animations synced
The original one(a part of it)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1);
}
And I changed it into(a part of it)(adding ,1)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1,1);
}
But when I compile it, I got warnings on each line I've edited
Warnings(a part on it)
Код:
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(127) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(129) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(133) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(135) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(137) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(139) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(141) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(143) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(145) : warning 202: number of arguments does not match definition
What's the problem@@


Re: Convert a animations fs(0.3a->0.3b) - kevinchui828 - 23.08.2010

Can anyone help me? The post is sinking....


Re: Convert a animations fs(0.3a->0.3b) - tony_fitto - 23.08.2010

I belive you dont need to add the last part, I never did that on my server and it's working good as i know for the moment.

-Try to use the script as you did in 0.3a If it works perfect there are nothing for you to fare.


Re: Convert a animations fs(0.3a->0.3b) - kevinchui828 - 24.08.2010

Quote:
Originally Posted by tony_fitto
Посмотреть сообщение
I belive you dont need to add the last part, I never did that on my server and it's working good as i know for the moment.

-Try to use the script as you did in 0.3a If it works perfect there are nothing for you to fare.
The animations won't sync with others but only showed on the client of the player who used the animation command.


Re: (0.3a->0.3b)a animations fs need help!!! - dax123 - 24.08.2010

did you update your include files that corresponds to 0.3b?
maybe associated pawno still refers 0.3a includes.


Re: Convert a animations fs(0.3a->0.3b) - kevinchui828 - 24.08.2010

I use 0.3b includes that come with 0.3b pawno


Re: Convert a animations fs(0.3a->0.3b) - dax123 - 24.08.2010

Quote:
Originally Posted by kevinchui828
Посмотреть сообщение
I use 0.3b includes that come with 0.3b pawno
yes and the number of arguments does not match the definition

ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);

ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1 ,1,1,1,1);

ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1 ,1,1,1,1,1);

I don't know why your previous script compiled in 0.3a but you don't need to add the last argument.


Re: (0.3a->0.3b)a animations fs need help!!! - erik019 - 19.09.2010

Quote:
Originally Posted by kevinchui828
Посмотреть сообщение
Versions before 0.3b, ApplyAnimation command looks like this
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time)
But in 0.3b
Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
I compiled the animation fs for 0.3b
But animations cannot be synced as they only showed on the client of the player who typed the animation command
So, I tried to edit the animation fs to make animations synced
The original one(a part of it)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1);
}
And I changed it into(a part of it)(adding ,1)
Код:
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1,1,1);
}
But when I compile it, I got warnings on each line I've edited
Warnings(a part on it)
Код:
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(125) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(127) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(129) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(131) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(133) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(135) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(137) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(139) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(141) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(143) : warning 202: number of arguments does not match definition
C:\Users\Kevin\Desktop\animlistbywoozie.pwn(145) : warning 202: number of arguments does not match definition
What's the problem@@
Open up the include named a_players.inc in your pawno directory and find for "ApplyAnimation" (without quotes)
After this edit this line:
Код:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
to this:
Код:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 1);
and after this recompile your FS or gamemode...It should be work without warnings
Credits to: Jacob74


Re: Convert a animations fs(0.3a->0.3b) - homijs - 30.09.2010

Still doesn't work