16.08.2011, 04:31
pawn Код:
//OnPlayerUpdate
static
Float: cHealth,
Float: pHealth[MAX_PLAYERS];
GetPlayerHealth(playerid, cHealth);
if(cHealth != pHealth[playerid]) {
OnPlayerHealthChange(playerid, pHealth[playerid], cHealth);
pHealth[playerid] = cHealth;
}
pawn Код:
OnPlayerHealthChange(playerid, Float: oldhealth, Float: newhealth) {
new tmp[128];
GetPlayerName(playerid, tmp, MAX_PLAYER_NAME);
format(tmp, sizeof tmp, "%s changed his health from %.0f to %.0f", oldhealth, newhealth);
SendClientMessageToAll(BLUE, tmp);
}
pawn Код:
CMD:armourme(playerid, params[])
{
if(dini_Int(PFile(playerid),"VipMember")<3)return SendClientMessage(playerid, red, "You must be Premium member to use this command");
{
SendClientMessage(playerid, red, "You must be Premium member to %.0f to %.0f", oldhealth, newhealth);
SetPlayerArmour(playerid, 99);
}
return 1;
}