23.07.2013, 22:13
Here you are mate. Quickly made this up, tell me if it works or not.
Код:
CMD:cuff(playerid, params[]) { new targetid; new Skin; Skin = GetPlayerSkin(playerid); if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Usage: /cuff [id]"); if(IsPlayerConnected(targetid)) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z)) { new str[512]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); new target[MAX_PLAYER_NAME]; GetPlayerName(targetid, target, sizeof(target)); format(str, sizeof(str), "You have cuffed %s!"); SendClientMessage(playerid, 0x0000BBAA, str); format(str, sizeof(str), "You have been cuffed by %s!"); SendClientMessage(targetid, 0x0000BBAA, str); SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);//this will set the object cuffs at the hand of the player you want to cuff. SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED); return 1; } } return 1; }