14.11.2013, 01:39
pawn Код:
#include <SetTimerCMD> //http://pastebin.com/u/OtaconEvil
#define TIEMPO_CURAR (30)
COMMAND:mas(playerid, params[]) {
if(GetTimerCMD(playerid,0)) {
new str[128];
format(str, sizeof(str), "Debes Esperar %d Segundos Para Volver a curarte!.", GetSegTimetCMD(playerid,0));
return SendClientMessage(playerid, -1, str);
}
new Float:health;
GetPlayerHealth(playerid, health);
if(health >= 20) {
SendClientMessage(uHealed, COLOR_orange, "ya estas curado, nol osnecesitas.");
} else {
SetPlayerHealth(playerid, (health+30));
SendClientMessage(uHealed, COLOR_orange, "te curaste con +30 de vida.");
SetTimerCMD(playerid,0,TIEMPO_CURAR);
}
return true;
}