31.07.2010, 23:43
(
Последний раз редактировалось iggy1; 31.07.2010 в 23:53.
)
Here is a good method,
Not tested but should work.
Edit: Delete that apple fuction all it does is returns 2. Unless for some reason you need that, I cant see why though.
This
Might aswell be
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(heal, 4, cmdtext);
return 0;
}
dcmd_heal(playerid, params[])
{
new id Float:amount;
if (sscanf(params, "df", id,amount))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /heal <playerid> <amount>");
if(id != INVALID_PLAYER_ID)
{
if(amount <= 100.0 && amount >= 1)
{
SetPlayerHealth(id,amount);
return 1;
}
else return SendClientMessage(playerid, 0xFF0000AA, "Error: Invalid Amount");
}
else return SendClientMessage(playerid, 0xFF0000AA, "Error: Player not found");
}
Edit: Delete that apple fuction all it does is returns 2. Unless for some reason you need that, I cant see why though.
This
pawn Код:
stock apple(playerid)
{
return 1+1;
}
pawn Код:
stock apple(playerid)
{
return 2;
}