18.10.2011, 10:40
(
Последний раз редактировалось umarmalik; 18.10.2011 в 11:20.
)
Hello,
I need little help in animations that not works properly. The problem is for example "when we use /handsup its working but when we use simple chat suppose I press "t" and then write some thing then I press enter the animation automatically stop.
here is the code of my gamemode animation.
I need little help in animations that not works properly. The problem is for example "when we use /handsup its working but when we use simple chat suppose I press "t" and then write some thing then I press enter the animation automatically stop.
here is the code of my gamemode animation.
pawn Код:
if(strcmp(cmd, "/handsup", true) == 0)
{
if(PlayerInfo[playerid][pJailed] == 2)
{
SendClientMessage(playerid, COLOR_GREY, "You cannot do this right now!");
return 1;
}
if(PlayerCuffed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You cannot do this right now!");
return 1;
}
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
if(strcmp(cmd,"/stopani",true) == 0 || strcmp(cmd,"/stopanim",true) == 0)
{
if(IsPlayerConnected(playerid))
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
}
return 1;
}
if(strcmp(cmd, "/dance", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /dance [style 1-4]");
return 1;
}
dancestyle = strval(tmp);
if(dancestyle < 1 || dancestyle > 4) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /dance [style 1-4]");
return 1;
}
if(dancestyle == 1) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
} else if(dancestyle == 2) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
} else if(dancestyle == 3) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
} else if(dancestyle == 4) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
}
return 1;
}
if(strcmp(cmd, "/rap", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /rap [style 1-3]");
return 1;
}
rapstyle = strval(tmp);
if(rapstyle < 1 || rapstyle > 3) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /rap [style 1-3]");
return 1;
}
if(rapstyle == 1) {
ApplyAnimationEx(playerid,"RAPPING","RAP_A_Loop",4.0,1,1,1,1,0);
} else if(rapstyle == 2) {
ApplyAnimationEx(playerid,"RAPPING","RAP_B_Loop",4.0,1,1,1,1,0);
} else if(rapstyle == 3) {
ApplyAnimationEx(playerid,"RAPPING","RAP_C_Loop",4.0,1,1,1,1,0);
}
return 1;
}
if(strcmp(cmd, "/wankoff", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /wankoff [style 1-3]");
return 1;
}
wankstyle = strval(tmp);
if(wankstyle < 1 || wankstyle > 3) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /wankoff [style 1-3]");
return 1;
}
if(wankstyle == 1) {
ApplyAnimationEx(playerid,"PAULNMAC","wank_in",4.0,1,1,1,1,0);
} else if(wankstyle == 2) {
ApplyAnimationEx(playerid,"PAULNMAC","wank_loop",4.0,1,1,1,1,0);
} else if(wankstyle == 3) {
ApplyAnimationEx(playerid,"PAULNMAC","wank_out",4.0,1,1,1,1,0);
}
return 1;
}
if(strcmp(cmd, "/strip", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /strip [style 1-7]");
return 1;
}
stripstyle = strval(tmp);
if(stripstyle < 1 || stripstyle > 7) {
SendClientMessage(playerid,0xFF0000FF,"Usage: /strip [style 1-7]");
return 1;
}
if(stripstyle == 1) {
ApplyAnimationEx(playerid,"STRIP","strip_A",4.0,1,1,1,1,0);
} else if(stripstyle == 2) {
ApplyAnimationEx(playerid,"STRIP","strip_B",4.0,1,1,1,1,0);
} else if(stripstyle == 3) {
ApplyAnimationEx(playerid,"STRIP","strip_C",4.0,1,1,1,1,0);
} else if(stripstyle == 4) {
ApplyAnimationEx(playerid,"STRIP","strip_D",4.0,1,1,1,1,0);
} else if(stripstyle == 5) {
ApplyAnimationEx(playerid,"STRIP","strip_E",4.0,1,1,1,1,0);
} else if(stripstyle == 6) {
ApplyAnimationEx(playerid,"STRIP","strip_F",4.0,1,1,1,1,0);
} else if(stripstyle == 7) {
ApplyAnimationEx(playerid,"STRIP","strip_G",4.0,1,1,1,1,0);
}
return 1;
}