10.06.2012, 19:27
hey,
I tried to make an Cuff animation instead of freeze.
That worked, but the player is still freezed....
Can someone tell why it doesn't work?
I tried to make an Cuff animation instead of freeze.
That worked, but the player is still freezed....
pawn Код:
command(cuff, playerid, params[])
{
new id, string[128];
if(sscanf(params, "u", id))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /cuff [playerid]");
}
else
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4)
{
if(GetDistanceBetweenPlayers(playerid, id) < 7)
{
Player[id][Cuffed] = 1;
format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
NearByMessage(playerid, NICESKY, string);
format(string, sizeof(string), "You have cuffed %s.", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
SendClientMessage(id, WHITE, string);
SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
TogglePlayerControllable(id, true);
}
else
{
SendClientMessage(playerid, WHITE, "You're too far away!");
}
}
else
{
if(GetDistanceBetweenPlayers(playerid, id) < 7)
{
Player[id][Cuffed] = 1;
format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id));
NearByMessage(playerid, NICESKY, string);
format(string, sizeof(string), "You have cuffed %s.", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid));
SendClientMessage(id, WHITE, string);
SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
TogglePlayerControllable(id, true);
}
}
}
return 1;
}


