Command only when 1 Score?
#8

Heres an example

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
	if(strcmp("/selfheal",cmdtext,true,9) == 0)//The cmd
		if(GetPlayerScore(playerid) != 1)
		{
			SendClientMessage(playerid,0xFFFFFF,"ERROR: Your score is not 1!");//If hes score is not 1
			return 1;
			}
		else
		{
		  SetPlayerHealth(playerid,100);
		  SendClientMessage(playerid,0xFFFFFF,"Your health has been set to 100");//If hes score is 1 he will have hes HP set to 100
		  return 1;
		  }
		return 1;
		}
Reply


Messages In This Thread
Command only when 1 Score? - by Deathangel1995 - 26.09.2009, 23:17
Re: Command only when 1 Score? - by brett7 - 26.09.2009, 23:21
Re: Command only when 1 Score? - by Deathangel1995 - 26.09.2009, 23:25
Re: Command only when 1 Score? - by Deathangel1995 - 26.09.2009, 23:39
Re: Command only when 1 Score? - by Jay_ - 27.09.2009, 00:55
Re: Command only when 1 Score? - by Deathangel1995 - 27.09.2009, 08:53
Re: Command only when 1 Score? - by Deathangel1995 - 27.09.2009, 10:10
Re: Command only when 1 Score? - by Desert - 27.09.2009, 11:12

Forum Jump:


Users browsing this thread: 1 Guest(s)