Animation not working - 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)
+--- Thread: Animation not working (
/showthread.php?tid=564840)
Animation not working -
Nabster - 23.02.2015
Animations doesn't work
Код:
forward DelayedAnthrax(playerid);
public DelayedAnthrax(playerid)
{
SetWeather(68);
SetWorldTime(7);
AnthraxActivated = 1;
AnthraxIssuer = playerid;
SendClientMessageToAll(COLOR_MAROON,"[ANTHRAX] Anthrax bomb has been launched all over San Andreas.");
if(PInfo[playerid][NoDamage] == 1) return 1;
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(PInfo[i][God] == 1 || PInfo[i][pAdminDuty] == 1 || PInfo[i][ASP] == 1 || PInfo[i][NoDamage] == 1)
return 1;
GameTextForPlayer(i, "~r~ANTRHAXED!",2000,3);
SetPlayerDrunkLevel(i,2000);
ApplyAnimation(i,"GRAFFITI","graffiti_Chkout",4.1,1,1,1,1,1,5);
ApplyAnimation(i,"GRAFFITI","graffiti_Chkout",4.1,1,1,1,1,1,5);
GetPlayerHealth(i,health);
SetPlayerHealth(i,health -90.0);
SendClientMessage(i,COLOR_RED,"You got affected by the anthrax bomb,you will feel dizzy for few seconds.");
}
return 1;
}
Re: Animation not working -
CalvinC - 23.02.2015
Why have you set forcesync to 5?
I believe forcesync can only be 0, 1 and 2.
Re: Animation not working -
Qu3esL - 23.02.2015
https://sampwiki.blast.hk/wiki/ApplyAnimation
Re: Animation not working -
Nabster - 23.02.2015
ah my bad,i thought its time parameter
EDIT: still not working
ApplyAnimation(i,"ped","gas_cwr",4.1,0,1,1,0,10,1) ;
Re: Animation not working -
De4dpOol - 23.02.2015
Use this code to preload an animation.
pawn Код:
stock PreloadAnims(playerid) {
ApplyAnimation(playerid,"GRAFFITI","graffiti_Chkout",4.1,1,1,1,1,1,5);
ApplyAnimation(playerid,"GRAFFITI","graffiti_Chkout",4.1,1,1,1,1,1,5);
return 1;
}
//under OnPlayerSpawn//
PreloadAnims(playerid);