13.10.2015, 10:23
Hi, for some reason i have to type the animation command twice before the character will do the animation.. are there a way to fix that?
if(strcmp(cmd, "/sit", true) == 0) {
ApplyAnimation(playerid,"INT_OFFICE","OFF_Sit_Type_Loop", 4.0, 1, 0, 0, 0, 0);
PlayerInfo[playerid][pApplyAnim]= 1;
return 1;
}
if(strcmp(cmd, "/kiss", true) == 0) {
// Get the dance style param
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_GREY,"USAGE: /kiss [style 1-7]");
return 1;
}
kisstyle = strval(tmp);
if(kisstyle < 1 || kisstyle > 7) {
SendClientMessage(playerid,COLOR_GREY,"USAGE: /kiss [style 1-7]");
return 1;
}
if(kisstyle == 1) {
ApplyAnimation(playerid,"BD_FIRE","Grlfrd_Kiss_03",4.0,0,0,0,0,0);
PlayerInfo[playerid][pApplyAnim]= 1;
} else if(kisstyle == 2) {
ApplyAnimation(playerid,"KISSING","Grlfrd_Kiss_01",4.0,0,0,0,0,0);
PlayerInfo[playerid][pApplyAnim]= 1;
} else if(kisstyle == 3) {
ApplyAnimation(playerid,"KISSING","Grlfrd_Kiss_02",4.0,0,0,0,0,0);
PlayerInfo[playerid][pApplyAnim]= 1;
} else if(kisstyle == 4) {
ApplyAnimation(playerid,"KISSING","Grlfrd_Kiss_03",4.0,0,0,0,0,0);
PlayerInfo[playerid][pApplyAnim]= 1;
} else if(kisstyle == 5) {
ApplyAnimation(playerid,"KISSING","Playa_Kiss_01",4.0,0,0,0,0,0);
PlayerInfo[playerid][pApplyAnim]= 1;
} else if(kisstyle == 6) {
ApplyAnimation(playerid,"KISSING","Playa_Kiss_02",4.0,0,0,0,0,0);
PlayerInfo[playerid][pApplyAnim]= 1;
} else if(kisstyle == 7) {
ApplyAnimation(playerid,"KISSING","Playa_Kiss_03",4.0,0,0,0,0,0);
PlayerInfo[playerid][pApplyAnim]= 1;
}
return 1;
}