Ah help timer?
#1

CMD:newlife(playerid,params[])
{
SetPlayerWantedLevel(playerid, 0);
SetPlayerHealth(playerid, 0.0);
ForceClassSelection(playerid);
return 1;
}

How to make it so if you use this and u try using this command again how do you make it you have to wait 2mins before using it again ?
Reply
#2

BUMP.....
Reply
#3

pawn Код:
new NLife;
CMD:newlife(playerid,params[])
{
      if(NLife == 1) return SendClientMessage(playerid,red,"You need to wait 2 minutes before starting a new life.");
      SetPlayerWantedLevel(playerid, 0);
      SetPlayerHealth(playerid, 0.0);
      ForceClassSelection(playerid);
      SetTimerEx("Life",120000,false,"i",playerid);
      NLife = 1;
      return 1;
}

forward Life(playerid);
public Life(playerid)
{
      NLife = 0;
      SendClientMessage(playerid,green,"You can start a new life again.");
      return 1;
}
Reply
#4

thanks
Reply
#5

ye for this how u make it so only VIP's can only use it

Код:
new NLife;
CMD:newlife(playerid,params[])
{
      if(NLife == 1) return SendClientMessage(playerid,red,"You need to wait 2 minutes before starting a new life.");
      SetPlayerWantedLevel(playerid, 0);
      SetPlayerHealth(playerid, 0.0);
      ForceClassSelection(playerid);
      SetTimerEx("Life",120000,false,"i",playerid);
      NLife = 1;
      return 1;
}

forward Life(playerid);
public Life(playerid)
{
      NLife = 0;
      SendClientMessage(playerid,green,"You can start a new life again.");
      return 1;
}
Код:
CMD:healme(playerid, params[])
{
if(IsPlayerVipType(playerid,2))
{
SetPlayerHealth(playerid, 100);
}
else SendClientMessage(playerid, COLOR_WHITE, "ERROR: You Are Not A VIP!");
return 1;
}
Reply
#6

pawn Код:
CMD:newlife(playerid,params[])
{
      if(!IsPlayerVipType(playerid,2)) return false;
      if(NLife == 1) return SendClientMessage(playerid,red,"You need to wait 2 minutes before starting a new life.");
      SetPlayerWantedLevel(playerid, 0);
      SetPlayerHealth(playerid, 0.0);
      ForceClassSelection(playerid);
      SetTimerEx("Life",120000,false,"i",playerid);
      NLife = 1;
      return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)