Only ID 0
#8

Код:
	if(strcmp(cmd, "/hp", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_LIGHTRED, "/hp [playerid/PartOfName] [health]");
			return 1;
		}
		new targetid = strval(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_LIGHTRED, "/hp [playerid/PartOfName] [health]");
			return 1;
		}
		new health = strval(tmp);
		if(IsPlayerConnected(targetid))
		{
			SetPlayerHealth(playerid, health);
		}
	  return 1;
	}
Although I would highly recommend you switched to dcmd + sscanf.
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: 8 Guest(s)