/heal command - Only for medics, how?
#1

Код:
new
		index,
		cmd[20];
	cmd = strtok(cmdtext, index);
	if (strcmp(cmd, "/heal", true) == 0)
	{
		new
			tmp[20],
			id;
		tmp = strtok(cmdtext, index);
		if (strlen(tmp))
		{
			id = strval(tmp);
			if (IsPlayerConnected(id))
			{
				SetPlayerHealth(id, 100.0);
				SendClientMessage(id, 0x00FF00AA, "You have been healed! / Zostałeś uzdrowiony/a!");
				SendClientMessage(playerid, 0x00FF00AA, "Player healed / Osoba uzdrowiona!");
			}
			else
			{
				SendClientMessage(playerid, 0xFF0000AA, "Player not found / Gracz nieznaleziony");
			}
		}
		else
		{
			SendClientMessage(playerid, 0xFF0000AA, "USAGE/UŻYCIE: /heal <playerid/idgracza>");
		}
		return 1;
	}
This command works perfectly but the only thing is I want to limit it only for a TEAM_MEDYK. How can I do that? I tried editing it a bit but i messed it up, so I left the right command which i posted above. Help would be appreciated.

Thanks and Regards
Puzi
Reply


Messages In This Thread
/heal command - Only for medics, how? - by Puzi - 30.05.2009, 13:11
Re: /heal command - Only for medics, how? - by member - 30.05.2009, 13:12
Re: /heal command - Only for medics, how? - by Puzi - 30.05.2009, 13:17
Re: /heal command - Only for medics, how? - by member - 30.05.2009, 13:23
Re: /heal command - Only for medics, how? - by Puzi - 30.05.2009, 13:43

Forum Jump:


Users browsing this thread: 1 Guest(s)