Only ID 0
#7

Quote:
Originally Posted by L30
Код:
	if(strcmp(cmd, "/hp", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
		  SendClientMessage(playerid, COLOR_LIGHTRED, "/hp [playerid/PartOfName] [health]");
		  return 1;
		}
		new health;
		health = strval(tmp);
		if(IsPlayerConnected(playerid))
		{
		  if(playerid != INVALID_PLAYER_ID)
		  {
			SetPlayerHealth(playerid, health);
		  }
		}
   	  }
	  return 1;
	}
That command doesn't have anything for the player given in the command, so it'll set the player who used the command's health
Reply


Messages In This Thread
Only ID 0 - by L30 - 08.10.2009, 02:50
Re: Only ID 0 - by _Vortex - 08.10.2009, 02:52
Re: Only ID 0 - by L30 - 08.10.2009, 03:01
Re: Only ID 0 - by shady91 - 08.10.2009, 03:09
Re: Only ID 0 - by _Vortex - 08.10.2009, 03:17
Re: Only ID 0 - by L30 - 08.10.2009, 03:42
Re: Only ID 0 - by _Vortex - 08.10.2009, 03:54
Re: Only ID 0 - by Blacklite - 08.10.2009, 04:37
Re: Only ID 0 - by UsaBoy91 - 08.10.2009, 08:11

Forum Jump:


Users browsing this thread: 2 Guest(s)