problem
#1

Guys i have problem with my /rp command here is the command

Код:
CMD:rp(playerid, params[])
{
  new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
	
	new plvl;
	GetPlayerWantedLevel(plvl);
	
	new string[256];
	
	new
	  giveplayerid,
	  reason[64];
	  
  if (sscanf(params, "uz", giveplayerid,reason))return SendClientMessage(playerid, 0xFF9900AA, "Usage: \"/rp [playerid/name] [reason]\"");
  else if (gTeam[playerid] != TEAM_COP)return SendClientMessage(playerid,0xFF9900AA,"Only Cops Can Use This Command!");
  else if (giveplayerid == INVALID_PLAYER_ID)return SendClientMessage(playerid, 0xFF9900AA, "Player Not Found");
  //else if (giveplayerid == playerid)return SendClientMessage(playerid,0xFF9900AA,"You Can't Report Yourself!");
  else if (GetDistanceBetweenPlayers(playerid,giveplayerid) > 4)return SendClientMessage(playerid,0xFF9900AA,"This Player Is Out Of Rage!");
	else if (giveplayerid == TEAM_COP)return SendClientMessage(playerid,0xFF9900AA,"You Can't Report Law Enforcement Officer");
  else if (IsJailed[giveplayerid] == true)return SendClientMessage(playerid,0xFF9900AA,"You Can't Report Prisoners!");
  else
  {
  format(reason, sizeof (reason), "You Have Been Reported By Officer %s(%d)", reason[0] ? ("For Criminal:"):(""),playername,playerid,reason);
	SendClientMessage(giveplayerid, 0x800080AA, reason);
	
	SetPlayerWantedLevel(giveplayerid,plvl +1);
	return 1;
	}
}
but it wont work so good ... i want when i type /rp id reason it will say ''You Have Been Reported By Officer (name)(id) For Criminalreason , what player type in) how i can do this ?
Reply


Messages In This Thread
problem - by Lajko1 - 13.12.2009, 10:37
Re: problem - by Lajko1 - 13.12.2009, 13:17
Re: problem - by Deat_Itself - 13.12.2009, 13:42
Re: problem - by Lajko1 - 13.12.2009, 14:52

Forum Jump:


Users browsing this thread: 1 Guest(s)