04.06.2011, 08:32
Код:
if (strcmp("/heal", cmdtext, true, 5) == 0) { if(IsPlayerVipType(playerid,1)) { SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_ORANGE,"[VIP Silver]You have been Healed"); return 1; }
if (strcmp("/heal", cmdtext, true, 5) == 0) { if(IsPlayerVipType(playerid,1)) { SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_ORANGE,"[VIP Silver]You have been Healed"); return 1; }
SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...)
GetTickCount()
//at the top Put this
new CanUseHeal[MAX_PLAYERS];
//the comamnd
if (strcmp("/heal", cmdtext, true, 5) == 0)
{
if(IsPlayerVipType(playerid,1) && CanUseHeal[playerid]==1)
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, COLOR_ORANGE,"[VIP Silver]You have been Healed");
CanUseHeal[playerid]=1;
SetTimer("HealAvailable", 60000, false);
return 1;
}else return SendClientMessage(playerid,COLOR_RED,"You need to wait 1 minute to heal yourself");
//put this in the bottum of ur script
forward HealAvailable();
public HealAvailable()
{
for(new playerid; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid)) return CanUseHeal[playerid]=0;
}
return 1;
}