Irgend wie wird meine Handschellen Animation nicht ausgeführt .. :/. Warum nicht ?
dcmd_handschellen(playerid,params[]){
#pragma unused params
new pID = strval(params),
string[64], string1[64],pname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME],
hs;
GetPlayerName(pID,pname,sizeof(pname));
GetPlayerName(playerid,name,sizeof(name));
if(sscanf(params,"u",pID)){
return SendClientMessage(playerid,rot,"/handschellen [playerid]");}
if(Spieler[playerid][fraktion] == 1)
{
if(hhandschellen[playerid] == 0)
{
TogglePlayerControllable(pID,0);
SetPlayerSpecialAction(pID,24);
hs = SetPlayerAttachedObject(pID, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
format(string,sizeof(string),"Du hast %s Handschellen angelegt!",pname);
SendClientMessage(playerid,hellblau,string);
format(string1,sizeof(string1),"%s hat dir Handschellen angelegt!",name);
SendClientMessage(pID,hellblau,string1);
hhandschellen[pID] = 1;
}
else if(hhandschellen[playerid] == 1)
{
TogglePlayerControllable(pID,1);
RemovePlayerAttachedObject(pID,hs);
SetPlayerSpecialAction(pID, 24);
format(string,sizeof(string),"Du hast %s die Handschellen abgenommen!",pname);
SendClientMessage(playerid,hellblau,string);
format(string1,sizeof(string1),"%s hat dir die Handschellen abgenommen!",name);
SendClientMessage(pID,hellblau,string1);
hhandschellen[pID] = 0;
}
else { SendClientMessage(playerid,rot,"Du bist kein Polizist"); }
}
return 1;
}