Help with new cuff animations
#1

Can you please help me add the new cuff anim code to this? Thanks!

Код:
	if(strcmp(cmd, "/cuff", true) == 0 || strcmp(cmd, "/cu", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsACop(playerid) || IsAFreecop(playerid))
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cuff [Playerid/PartOfName]");
					return 1;
				}
				if(PlayerInfo[playerid][pDBanned] == 1)
				{
			    	SendClientMessage(playerid, COLOR_GREY, "* You are Banned From Cop Duty!");
			    	return 1;
				}
				if(PlayerInfo[playerid][pDuty] == 0)
				{
			    	SendClientMessage(playerid, COLOR_GREY, "* You aren't on Duty!");
			    	return 1;
				}
				giveplayerid = ReturnUser(tmp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				        if(IsACop(giveplayerid) || IsAFreecop(giveplayerid))
				        {
				            SendClientMessage(playerid, COLOR_GREY, "* You can't Cuff Cops !");
					        return 1;
				        }
				        if(GaveUp[giveplayerid] == 0)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "* Player Didn't Gave up!");
					        return 1;
					    }
					    if(PlayerCuffed[giveplayerid] > 0)
					    {
					        SendClientMessage(playerid, COLOR_GREY, "* Player already Cuffed !");
					        return 1;
					    }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "You cannot cuff yourself!");
						    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
     	 					format(string, sizeof(string), "* You were Cuffed by %s", sendername);
							SendClientMessage(giveplayerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* You Cuffed %s", giveplayer);
							SendClientMessage(playerid, COLOR_WHITE, string);
							format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer);
							ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
							GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
							TogglePlayerControllable(giveplayerid, 1);
							PlayerCuffed[giveplayerid] = 1;
							cufftimer[giveplayerid] = SetTimerEx("CheckDist",10000,true,"ii",giveplayerid,playerid);
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, "* That player is not near you !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "* That player is Offline !");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "* You are not a Cop / FBI / National Guard !");
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Help with new cuff animations - by MrSnapp - 07.07.2012, 04:19
Re: Help with new cuff animations - by TheLazySloth - 07.07.2012, 05:06
Re: Help with new cuff animations - by Isaac Mofujohn - 07.07.2012, 08:23
Re: Help with new cuff animations - by Phil_Cutcliffe - 15.02.2013, 18:12

Forum Jump:


Users browsing this thread: 2 Guest(s)