Cuff and Heal commands not working
#1

Hello all im having trouble getting my cuff command and medic heal commands working wondering what could be wrong with em thanks for looking.

EDIT: Heal command has been fixed now it`s just the cuff one.

Код:
dcmd_cuff(playerid, params[])
{
  #pragma unused params

	new targetid = strval(params); new CurrentState = GetPlayerState(targetid);
	if (!Player[playerid][IsPlayerInGame])
		{
	  SMSpawn; GTFPSpawn; Deny;
		return 1;
		}
	if (strlen(params)==0)
	  {
	  SendClientMessage(playerid, PURPLE, "Usage: /cuff targetid."); Deny;
	  return 1;
	  }
	if (!IsPlayerConnected(targetid))
  	{
	  format(MyString, sizeof(MyString), "%i is not a valid player.", targetid); SendCMP; GameTFP;
	  Deny;
    return 1;
    }
  if (!Coppers(playerid) && !FBI(playerid) && !Army(playerid) && !CIA(playerid))
		{
		format(MyString, sizeof(MyString), "Only the police can hand cuff!."); SendCMG; GameTFP;
		Deny;
	  return 1;
  	}
	if (GetPlayerWantedLevel(playerid) < 3)
    {
	  format(MyString, sizeof(MyString), "Go hassle some real criminals.", playerid); SendCMP; GameTFP;
	  Deny;
	  return 1;
	  }
	if (!NearPlayer(2, playerid, targetid))
  	{
  	PNAME; TNAME; Deny;
    format(MyString, sizeof(MyString), "%s (%i) is too far away.", TargetName, targetid); GameTFP;
	  SendClientMessage(playerid, YELLOW, MyString);
	  return 1;
  	}
  if (CurrentState == PLAYER_STATE_PASSENGER || CurrentState == PLAYER_STATE_DRIVER)
    {
	  format(MyString, sizeof(MyString), "You cannot cuff people in cars.", playerid); SendCMP; GameTFP;
	  Deny;
	  return 1;
	  }
	if (targetid == playerid)
	  {
	  Deny; SendClientMessage(playerid, PURPLE, "You cannot cuff yourself!");
	  GameTextForPlayer(playerid, "You cannot cuff yourself!", 3000, 3);
	  return 1;
  		}
	if (GetPlayerWantedLevel(playerid) > 3 && CurrentState == PLAYER_STATE_ONFOOT)
    {
	  format(MyString, sizeof(MyString), "You have been cuffed.", targetid); SendCMPT; GameTFPT;
	  DenyT; TPC(targetid, 0); Player[targetid][Cuffed] = 1;
	  return 1;
	  }
	return 1;
}
Reply


Messages In This Thread
Cuff and Heal commands not working - by Jokel317 - 10.11.2009, 04:40
Re: Cuff and Heal commands not working - by RoBo - 10.11.2009, 06:32
Re: Cuff and Heal commands not working - by Jokel317 - 10.11.2009, 21:12
Re: Cuff and Heal commands not working - by Sew_Sumi - 11.11.2009, 00:17
Re: Cuff and Heal commands not working - by Jokel317 - 11.11.2009, 00:35
Re: Cuff and Heal commands not working - by Sew_Sumi - 11.11.2009, 03:31
Re: Cuff and Heal commands not working - by Jokel317 - 11.11.2009, 14:17
Re: Cuff and Heal commands not working - by Sew_Sumi - 11.11.2009, 14:36
Re: Cuff and Heal commands not working - by Jokel317 - 11.11.2009, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)