PDA

View Full Version : AnnimatioN


RicaNiel
09/04/2012, 03:33 AM
need help all animations i will put will not show up please i need help

ClearAnimations(id);
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,1);

ViniBorn
09/04/2012, 03:37 AM
Try
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);

RicaNiel
09/04/2012, 03:40 AM
still same wont execute

robyury
09/04/2012, 03:40 AM
Try It:

ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);

And try text the command 2 times.

RicaNiel
09/04/2012, 03:42 AM
here is the command

CMD:taze(playerid,params[])
{
new id;
if(pData[playerid][pType] != LAW) return SendClientMessage(playerid,C_RED,"[ Error ]:"CWHITE" You need to be in the Law Faction to use this command");
if(sscanf(params,"u",id)) return SendClientMessage(playerid,C_WHITE,"Usage: /taze [ Name / Id ]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,C_RED,"[ Error ]:"CWHITE" Player Not Connected");
if(pData[id][pWantedLevel] == 0 ) return SendClientMessage(playerid,C_RED,"[ Error ]:"CWHITE" That person is dosen't have a warrant and you are not allowed to taze that person");
if(IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid,C_RED,"[ Error ]:"CWHITE" The suspect is in a vehicle you can't taze it");
if(tazzed[playerid] == 1) return SendClientMessage(playerid,C_RED,"[ Error ]:"CWHITE" That person is already tazzed");
if(IsPlayerNearPlayer(playerid,id,3.0))
{
SendClientMessage(playerid,C_BLUE," An officer has tazzed you and you can't move");
tazzed[playerid] = 1;
ClearAnimations(id);
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);
TogglePlayerControllable(id,0);
}
else return SendClientMessage(playerid,C_RED,"[ Error ]:"CWHITE" That Person is too far away to taze");
return 1;
}

Reklez
09/04/2012, 03:45 AM
i see the problem


ClearAnimations(id);
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);
TogglePlayerControllable(id,0);


so if you taze the player it will play the animation but the TogglePlayerControllable blocks it.

never try this?


ClearAnimations(id);
TogglePlayerControllable(id,0);
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);

Ballu Miaa
09/04/2012, 03:46 AM
Does this one compile and execute fine for you!

ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1,1);

robyury
09/04/2012, 03:46 AM
You put me in a problem : i don't know ZCMD.

But try substitute your actual anim for this script :

ApplyAnimation(id, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);

this is an anim of my gamemode and this works.

RicaNiel
09/04/2012, 03:48 AM
i see the problem


ClearAnimations(id);
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);
TogglePlayerControllable(id,0);


so if you taze the player it will play the animation but the TogglePlayerControllable blocks it.

never try this?


ClearAnimations(id);
TogglePlayerControllable(id,0);
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);


its still same the animation wont execute

ViniBorn
09/04/2012, 03:51 AM
Typing the command twice it works?

robyury
09/04/2012, 03:56 AM
Typing the command twice it works?

in my gamemode i only can use the anims when i type the command twice. :P

Try put the code twice ! this maybe works at the anim !

Ballu Miaa
09/04/2012, 06:07 PM
The anim library is already preloaded always or we need to load/call it?

Get the calling function if you need to load/call the library before using the animations!