SHOW:
|
|
- or go back to the newest paste.
1 | command(cuff, playerid, params[]) | |
2 | { | |
3 | new id, string[128]; | |
4 | if(sscanf(params, "u", id)) | |
5 | { | |
6 | SendClientMessage(playerid, WHITE, "SYNTAX: /cuff [playerid]"); | |
7 | } | |
8 | else | |
9 | { | |
10 | if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4) | |
11 | { | |
12 | if(Player[id][Tazed] == 1) | |
13 | { | |
14 | if(GetDistanceBetweenPlayers(playerid, id) < 7) | |
15 | { | |
16 | - | TogglePlayerControllable(id, false); |
16 | + | Player[id][Cuffed] = 1; |
17 | - | ApplyAnimation(id, "ped", "cower", 1, 1, 0, 0, 0, 0); |
17 | + | Player[id][Tazed] = 0; |
18 | - | Player[id][Cuffed] = 1; |
18 | + | format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id)); |
19 | - | Player[id][Tazed] = 0; |
19 | + | NearByMessage(playerid, NICESKY, string); |
20 | - | format(string, sizeof(string), "* %s has cuffed %s.", GetName(playerid), GetName(id)); |
20 | + | format(string, sizeof(string), "You have cuffed %s.", GetName(id)); |
21 | - | NearByMessage(playerid, NICESKY, string); |
21 | + | SendClientMessage(playerid, WHITE, string); |
22 | - | format(string, sizeof(string), "You have cuffed %s.", GetName(id)); |
22 | + | format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid)); |
23 | - | SendClientMessage(playerid, WHITE, string); |
23 | + | SendClientMessage(id, WHITE, string); |
24 | - | format(string, sizeof(string), "You have been cuffed by %s.", GetName(playerid)); |
24 | + | RemovePlayerAttachedObject(id, 9); |
25 | - | SendClientMessage(id, WHITE, string); |
25 | + | SetPlayerAttachedObject(id, 9, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000); |
26 | - | TogglePlayerControllable(id, false); |
26 | + | SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED); |
27 | }}}}return 1;} |