0.3e Cuff system Help
#1

How can i make the new cuff function with the cuff object for 3e can anyone tell me the code or what i need add to the current code i have

Код:
CMD:cuff(playerid, params[])
{
	if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5)
	{
		if(GetPVarInt(playerid, "Injured") == 1)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
			return 1;
		}

		new string[128], giveplayerid;
		if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /cuff [playerid]");

		if(IsPlayerConnected(giveplayerid))
		{
			if (ProxDetectorS(8.0, playerid, giveplayerid))
			{
				if(giveplayerid == playerid) { SendClientMessageEx(playerid, COLOR_GREY, "You cannot cuff yourself!"); return 1; }
				if(PlayerCuffed[giveplayerid] == 1 || GetPlayerSpecialAction(giveplayerid) == SPECIAL_ACTION_HANDSUP)
				{
					format(string, sizeof(string), "* You have been handcuffed by %s.", GetPlayerNameEx(playerid));
					SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "* You handcuffed %s, till uncuff.", GetPlayerNameEx(giveplayerid));
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "* %s handcuffs %s, tightening the cuffs securely.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
					ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
					TogglePlayerControllable(giveplayerid, 0);
					ClearAnimations(giveplayerid);
					ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0,1);
					PlayerCuffed[giveplayerid] = 2;
					SetPVarInt(giveplayerid, "PlayerCuffed", 2);
					SetPVarInt(giveplayerid, "IsFrozen", 1);
					//Frozen[giveplayerid] = 1;
					PlayerCuffedTime[giveplayerid] = 999999;
				}
				else
				{
					SendClientMessageEx(playerid, COLOR_GREY, "That player isn't restrained!");
					return 1;
				}
			}
			else
			{
				SendClientMessageEx(playerid, COLOR_GREY, "That player isn't near you.");
				return 1;
			}
		}
		else
		{
			SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
			return 1;
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GREY, "You're not a law enforcement officer.");
	}
	return 1;
}
Reply
#2

Put this under GameTextforPlayer(giveplayerid, "~r~Cuffed blah blah put this under that line.
pawn Код:
SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
          SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED);
Reply
#3

I tried that but game me this error error 017: undefined symbol "SPECIAL_ACTION_CUFFED"
Reply
#4

Update the include files.
Reply
#5

The Includes are updated to 3e already
Reply
#6

Anyone can help me with this plz i still have the error i dont know why if i have updated everything to 3e
Reply
#7

Hey i did edit the cuff script. but now i have a problem..
I saw in a video if you are cuffed that you can walk away and stuff.
How do i fix that in my script ??

Please help me
Reply
#8

maybe i can help you can you send me your cuff code
Reply
#9

Quote:
Originally Posted by adelechevarria
Посмотреть сообщение
maybe i can help you can you send me your cuff code
I have a hint

: Learn Scripting.
Reply
#10

Open your a_players include ( right click then open with then notepad )
then add this

#define SPECIAL_ACTION_CUFFED 24
then save the file ( press ctrl + S )
Done now you updated your include file
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)