2 Questions :
#1

what's wrong here ?

Код:
dcmd_health(playerid, params[])
{
	new
		giveplayerid,
		amount;
	if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /givecash [playerid/partname] [amount]");
	else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
	else if (amount > 100) SendClientMessage(playerid, 0xFF0000AA, "Invalid health");
	else
	{
		
        SetPlayerHealth(giveplayerid, amount);

		format(string,sizeof(string),"life's й [%i]",GetPlayerHealth(giveplayerid));// %d or %i = shows 1 of hp -.-'
		SendClientMessageToAll(COR_BRANCO, string);
 	}
	return 1;
}
And How do I do for everytime that I uses a command, the player lose -10hp from his life?
Reply


Messages In This Thread
2 Questions : - by felipex - 16.07.2010, 13:41
Re: 2 Questions : - by felipex - 16.07.2010, 13:59
Re: 2 Questions : - by tanush - 16.07.2010, 14:06
Re: 2 Questions : - by felipex - 16.07.2010, 14:09
Re: 2 Questions : - by Jeffry - 16.07.2010, 14:10
Re: 2 Questions : - by felipex - 16.07.2010, 14:18
Re: 2 Questions : - by Jeffry - 16.07.2010, 14:26
Re: 2 Questions : - by felipex - 16.07.2010, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)