Adding [Reason]
#2

Код:
if(!strcmp(cmd, "/suspect", true))
{
	if(gTeam[playerid] == TEAM_COPS)
	{
		tmp = strtok(cmdtext, index);
		if(!strlen(tmp))return SendClientMessage(id, 0xFFFF00AA, "-> You mean: /suspect [PlayerID] [reason]");
		id = strval(tmp);
		strmid(tmp, cmdtext, strlen(cmd)+strlen(tmp)+2, strlen(cmdtext));
		if(IsPlayerConnected(id))
		{
			new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], string[128];
			GetPlayerName(playerid, name, sizeof(name));
			GetPlayerName(id, name2, sizeof(name2));
			format(string, sizeof(string), "-> Police Officer %s has suspected a %s. Reason: %s", name, name2, tmp);
			SendClientMessageToAll(0xFFFF00AA, string);
			SendClientMessage(id, 0xFFFF00AA, "-> You are now a police suspect, cops will try to arrest you!");
			SetPlayerWantedLevel(id, 2);
		}else SendClientMessage(playerid, 0xFFFF00AA, "-> Player not found");
	}else SendClientMessage(playerid, 0xFFFF00AA, "-> You are not a Police Officer");
	return 1;
}
Reply


Messages In This Thread
Adding [Reason] - by Hot - 21.05.2009, 22:08
Re: Adding [Reason] - by Jefff - 21.05.2009, 22:29
Re: Adding [Reason] - by Hot - 21.05.2009, 22:35
Re: Adding [Reason] - by NovaParadox - 21.05.2009, 22:43
Re: Adding [Reason] - by Badger(new) - 21.05.2009, 22:49
Re: Adding [Reason] - by NovaParadox - 21.05.2009, 23:06
Re: Adding [Reason] - by Badger(new) - 21.05.2009, 23:33

Forum Jump:


Users browsing this thread: 1 Guest(s)