Author Topic: Work 100% Heal Cmd in 5 seconds  (Read 10487 times)

0 Members and 2 Guests are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Work 100% Heal Cmd in 5 seconds
« on: February 08, 2013, 02:54:29 pm »
for begin
[pawn]new Medic[MAX_PLAYERS];[/pawn]
cmd
[pawn]    else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
      new Float:Health; GetPlayerHealth( playerid, Health );
        if ( Health >= 100 ) SendClientMessage( playerid, COLOR_YELLOW, ">> Error: You are healthy." );
      else
      {
          TogglePlayerControllable(playerid,0);
          SetTimer("healing", 5000, false);
          DecPlayerHandCash(playerid,200);
          GameTextForPlayer(playerid, "Healing");
      Medic[playerid] = 1;
      }
      return 1;
      }[/pawn]
timer stock workable
[pawn]public healing() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Medic == 1) {
TogglePlayerControllable(i, 1);
SetPlayerHealth( i, 100.0 );
SendClientMessage( i, COLOR_YELLOW, ">> You have been healed!" );
             }
           }
         }
       }[/pawn]
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #1 on: February 08, 2013, 03:01:52 pm »
Shit man will u stop this?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #2 on: February 08, 2013, 03:06:13 pm »
Quote
Shit man will u stop this?
what happend this is workable heal in 5 seconds
it is workable not like other timers
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #3 on: February 08, 2013, 04:30:50 pm »
Quote
Shit man will u stop this?
what happend this is workable heal in 5 seconds
it is workable not like other timers

maybe, but aren't u bored of posting that several times?
make it in SQL or above the timer.


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #4 on: February 08, 2013, 04:32:54 pm »
man i didnot post this serval times
that i to help that guy
and this is workable
in 5 seconds
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #5 on: February 08, 2013, 04:47:13 pm »
man i didnot post this serval times
that i to help that guy
and this is workable
in 5 seconds

several times is not 1, 000, 000 times


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #6 on: February 08, 2013, 10:49:52 pm »
SetTimer("healing", 5000, false);

Every time a player uses the healing command, ANOTHER timer is created. Eventually, not only will 100 timers be running, but the timers will interfere with each other, causing it to run what seems to be every tenth of a second. Put that line of code in OnGameModeInit and don't put it in a command, and it'll work okay, except that if a player heals a second before the timer runs, it only takes one second for them to heal.
Do not PM me for support.




Offline USA.Ghost

  • Street Thug
  • *
  • Posts: 42
  • Pawn Scripter, IT Professional
    • View Profile
    • NE Clan Official forum
Re: Work 100% Heal Cmd in 5 seconds
« Reply #7 on: February 23, 2013, 01:59:54 pm »
SetTimer("healing", 5000, false);

Every time a player uses the healing command, ANOTHER timer is created. Eventually, not only will 100 timers be running, but the timers will interfere with each other, causing it to run what seems to be every tenth of a second. Put that line of code in OnGameModeInit and don't put it in a command, and it'll work okay, except that if a player heals a second before the timer runs, it only takes one second for them to heal.

Use killtimer when it ends



Click the Click Here button on top to earn free cash by completing offers, surveys, refer others and much more

Click here to join my clan

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Work 100% Heal Cmd in 5 seconds
« Reply #8 on: February 23, 2013, 05:00:46 pm »
SetTimer("healing", 5000, false);

Every time a player uses the healing command, ANOTHER timer is created. Eventually, not only will 100 timers be running, but the timers will interfere with each other, causing it to run what seems to be every tenth of a second. Put that line of code in OnGameModeInit and don't put it in a command, and it'll work okay, except that if a player heals a second before the timer runs, it only takes one second for them to heal.

Use killtimer when it ends

But if 40 players wants to heal in the same time ? => 5 sec x40

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #9 on: February 23, 2013, 05:30:40 pm »
Use killtimer when it ends
Put that line of code in OnGameModeInit and don't put it in a command, and it'll work okay, except that if a player heals a second before the timer runs, it only takes one second for them to heal.

sigh
Do not PM me for support.




Offline USA.Ghost

  • Street Thug
  • *
  • Posts: 42
  • Pawn Scripter, IT Professional
    • View Profile
    • NE Clan Official forum
Re: Work 100% Heal Cmd in 5 seconds
« Reply #10 on: February 23, 2013, 06:40:44 pm »
SetTimer("healing", 5000, false);

Every time a player uses the healing command, ANOTHER timer is created. Eventually, not only will 100 timers be running, but the timers will interfere with each other, causing it to run what seems to be every tenth of a second. Put that line of code in OnGameModeInit and don't put it in a command, and it'll work okay, except that if a player heals a second before the timer runs, it only takes one second for them to heal.

Use killtimer when it ends

But if 40 players wants to heal in the same time ? => 5 sec x40
disable cmd until the healing player heals



Click the Click Here button on top to earn free cash by completing offers, surveys, refer others and much more

Click here to join my clan

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #11 on: February 23, 2013, 06:50:30 pm »
One lol guy has seen heal system which takes 5 secs to heal...and...they're still posting shit. Can u make healsys above the timer? What is the zest of giving player hps after 5 secs of saying !healme by em? Remove that shit and make normal system, this  will be the most perfect thing.


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline USA.Ghost

  • Street Thug
  • *
  • Posts: 42
  • Pawn Scripter, IT Professional
    • View Profile
    • NE Clan Official forum
Re: Work 100% Heal Cmd in 5 seconds
« Reply #12 on: February 23, 2013, 09:09:37 pm »
One lol guy has seen heal system which takes 5 secs to heal...and...they're still posting shit. Can u make healsys above the timer? What is the zest of giving player hps after 5 secs of saying !healme by em? Remove that shit and make normal system, this  will be the most perfect thing.

Its because of anti-abuse



Click the Click Here button on top to earn free cash by completing offers, surveys, refer others and much more

Click here to join my clan

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Work 100% Heal Cmd in 5 seconds
« Reply #13 on: February 23, 2013, 11:08:16 pm »
One lol guy has seen heal system which takes 5 secs to heal...and...they're still posting shit. Can u make healsys above the timer? What is the zest of giving player hps after 5 secs of saying !healme by em? Remove that shit and make normal system, this  will be the most perfect thing.

Its because of anti-abuse

WHAT
THE
ANTI
ABUSE?


Calm down. -stormeus
« Last Edit: February 27, 2013, 01:04:16 am by stormeus »


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline USA.Ghost

  • Street Thug
  • *
  • Posts: 42
  • Pawn Scripter, IT Professional
    • View Profile
    • NE Clan Official forum
Re: Work 100% Heal Cmd in 5 seconds
« Reply #14 on: February 26, 2013, 04:04:13 pm »
One lol guy has seen heal system which takes 5 secs to heal...and...they're still posting shit. Can u make healsys above the timer? What is the zest of giving player hps after 5 secs of saying !healme by em? Remove that shit and make normal system, this  will be the most perfect thing.

Its because of anti-abuse


WHAT
THE
ANTI
ABUSE?

'

so players wont heal when they for example, are being shot
« Last Edit: February 27, 2013, 01:04:32 am by stormeus »



Click the Click Here button on top to earn free cash by completing offers, surveys, refer others and much more

Click here to join my clan