12.05.2012, 11:41
hi everyone, i got a problem with cuffs animation.
Hear is my cuffs cmd:
Hear is my cuffs cmd:
Код:
if(!strcmp(cmdtext, "/ant", true,4)) { if(cmdtext[4]==0) { SendClientMessage(playerid,Zalia,"Uћdėti arba nuimti antrankius: {FF0000}/ant [dalis vardo]"); return 1; } new vardas[MAX_PLAYER_NAME]; strmid(vardas,cmdtext[5],0,MAX_PLAYER_NAME); new id = GetPlayeridMid(vardas); if (id == INVALID_PLAYER_ID) { SendClientMessage(playerid, Raudona, "Tokio ћaidejo nėra."); return 1; } /*if (id == playerid) { SendClientMessage(playerid, Raudona, "Savęs surakinti negali."); return 1; }*/ new Float:Coo[3]; GetPlayerPos(id,Coo[0],Coo[1],Coo[2]); if(!PlayerToPoint(3, playerid, Coo[0],Coo[1],Coo[2])) { SendClientMessage(playerid, Raudona, "Ћaidėjas per toli."); return 1; } new msg[128],police[MAX_PLAYER_NAME]; GetPlayerName(playerid,police,sizeof(police)); GetPlayerName(id,vardas,sizeof(vardas)); if(playerDB[id][cuffed]) { playerDB[id][cuffed]=false; ClearAnimations(playerid); RemovePlayerAttachedObject(id,0); TogglePlayerControllable(id,true); ClearAnimations(id); format(msg,sizeof(msg),"Nuėmėte antrankius ћaidėjui {FF0000}%s.",vardas); SendClientMessage(playerid,Melina,msg); format(msg,sizeof(msg),"Policininkas {FF0000}%s {0080FF}paleido jus.",police); SendClientMessage(id,Melina,msg); }else{ playerDB[id][cuffed]=true; ClearAnimations(id); TogglePlayerControllable(id,false); SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED); SetPlayerAttachedObject(id, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000); format(msg,sizeof(msg),"Uћdėjote antrankius ћaidėjui {FF0000}%s.",vardas); SendClientMessage(playerid,Melina,msg); format(msg,sizeof(msg),"Policininkas {FF0000}%s {0080FF}Surakino jus.",police); SendClientMessage(id,Melina,msg); } return 1; }