Cuffing
#5

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;
}
Reply


Messages In This Thread
Cuffing - by Joey_euber - 23.07.2013, 22:05
Re: Cuffing - by Vanter - 23.07.2013, 22:09
Re: Cuffing - by Joey_euber - 23.07.2013, 22:11
Re: Cuffing - by JimmyCh - 23.07.2013, 22:11
Re: Cuffing - by Nines - 23.07.2013, 22:13
Re: Cuffing - by Joey_euber - 23.07.2013, 22:26
Re: Cuffing - by JimmyCh - 23.07.2013, 22:27
Re: Cuffing - by Joey_euber - 23.07.2013, 22:29
Re: Cuffing - by JCooper - 23.07.2013, 23:16
Re: Cuffing - by Joey_euber - 24.07.2013, 00:13

Forum Jump:


Users browsing this thread: 1 Guest(s)