Cuff help
#1

I need help getting this to work with the new cuff system for 0.3e
Код:
CMD:cuff(playerid, params[])
{
	new playerb, string[128];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(!IsACop(playerid) && !IsAGuard(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer.");
	if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
	if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [playerid]");
	if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    if(!IsPlayerNearPlayer(playerid, playerb, 2)) return SendClientMessage(playerid, COLOR_GREY, "You are too far away from that player.");
	if(!IsPlayerTazed(playerb) && GetPlayerSpecialAction(playerb) != SPECIAL_ACTION_HANDSUP) return SendClientMessage(playerid, COLOR_GREY, "Player is not tazed nor has their hands up.");
	// /me Message & Animation
	GameTextForPlayer(playerb, "~r~Cuffed", 3500, 3);
    format(string, sizeof(string), "* %s pulls a pair of steel cuffs from their belt and puts %s's hands inside them.", RPN(playerid), RPN(playerb));
	SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
	ClearAnimations(playerb);
	//ApplyAnimation(playerb,"ped","cower",1,1,0,0,0,0,1);
	// Custom Freeze
	TogglePlayerControllable(playerb, 0);
	//ApplyAnimation(playerb,"ped","cower",1,1,0,0,0,0,1);
	SetPlayerAttachedObject(playerb, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
    SetPlayerSpecialAction(playerb,SPECIAL_ACTION_CUFFED);
	// Tazed Setting
	TogglePlayerTazed(playerb, 0);
	TogglePlayerCuffed(playerb, 1);
	// Cuff Timeout
	CuffTimeout[playerb] = 300;
	KillTimer(TazeCountDown[playerb]);
	CuffCountDown[playerb] = SetTimerEx("CuffTimer", 1000, true, "d", playerb);
	return 1;
}
Reply
#2

Anyone?
Reply
#3

What's wrong with this ?
Reply
#4

Quote:
Originally Posted by The__
Посмотреть сообщение
What's wrong with this ?
Nothing, I want it to work with the 0.3e animations and how you can run when cuffed etc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)