{HELP} I'm in need of a /bite command
#6

Quote:
Originally Posted by Desert
O yeah didnt think of that

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	dcmd(bite,4,cmdtext);
	return 0;
}
dcmd_bite(playerid,params[])
{
	new tmp[4],idx;
	tmp = strtok(params,idx);
	new Float:X,Float:Y,Float:Z;
	GetPlayerPos(strval(tmp),X,Y,Z);
	if(!strval(tmp))
	{
	  SendClientMessage(playerid,COLOUR_RED,"USAGE: /bite [ID]");
	  return 1;
	  }
	else if(!IsPlayerInRangeOfPoint(playerid,5,X,Y,Z);
	{
	  SendClientMessage(playerid,COLOUR_RED,"You are not close enough to the targeted ID");
	  return 1;
	  }
	else
	{
	  new pid,string[34],string1[30];
	  pid = strval(tmp);
		SetPlayerHealth(pid,GetPlayerHealth(pid)-25);
		format(string),sizeof(string),"You have succesfully bitten %s",pid);
		format(string1),sizeof(string1),"You have been bitten by %s",playerid);
		SendClientMessage(playerid,COLOUR_YELLOW,string);
		SendClientMessage(pid,COLOUR_RED,string1);
		return 1;
		}
	return 1;
	}
Tho this code would only work on version 0.3 since it uses IsPlayerInRangeOfPoint
Dude, that's nice, but can you please make it for 0.2? I mean like you don't have to do it, but i'm atleast asking you kindly
Reply


Messages In This Thread
{HELP} I'm in need of a /bite command - by Alex_Grant - 26.09.2009, 17:31
Re: {HELP} I'm in need of a /bite command - by Desert - 26.09.2009, 18:54
Re: {HELP} I'm in need of a /bite command - by ded - 26.09.2009, 19:39
Re: {HELP} I'm in need of a /bite command - by Desert - 26.09.2009, 19:49
Re: {HELP} I'm in need of a /bite command - by ded - 26.09.2009, 19:56
Re: {HELP} I'm in need of a /bite command - by Alex_Grant - 27.09.2009, 05:32
Re: {HELP} I'm in need of a /bite command - by XCultz - 27.09.2009, 05:35
Re: {HELP} I'm in need of a /bite command - by coole210 - 27.09.2009, 06:11
Re: {HELP} I'm in need of a /bite command - by Alex_Grant - 27.09.2009, 06:21
Re: {HELP} I'm in need of a /bite command - by Calgon - 27.09.2009, 06:35

Forum Jump:


Users browsing this thread: 1 Guest(s)