16.07.2010, 13:41
what's wrong here ?
And How do I do for everytime that I uses a command, the player lose -10hp from his life?
Код:
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; }