Код:
CMD:acuff(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/cuff [ID]");
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x,y,z);
PlayerPlaySound(id, 5201, x,y,z);
SendClientMessage(id, 0xFF0000AA, "* You are now cuffed.");
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);
return 1;
}
CMD:auncuff(playerid,params[])
{ new id1;
if(sscanf(params,"u",id1)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/slay [ID]");
new Float:x, Float:y, Float:z;
GetPlayerPos(id1, x,y,z);
PlayerPlaySound(id1, 5201, x,y,z);
SendClientMessage(id1, 0xFF0000AA, "* You are now uncuffed.");
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(id1, i)) RemovePlayerAttachedObject(id1, i);
SetPlayerSpecialAction(id1, SPECIAL_ACTION_NONE);
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
if(newkeys & KEY_SPRINT && !(oldkeys & KEY_SPRINT) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
return 1;
}