Author Topic: set timer help  (Read 4478 times)

0 Members and 1 Guest are viewing this topic.

Offline [Akatsuki]Itachi

  • Wiseguy
  • **
  • Posts: 65
  • I am just a normal ???? people.
    • View Profile
    • [Akatsuki]Konoha
set timer help
« on: July 07, 2013, 04:09:26 am »
These few day, i want to set timer like when you type !heal, need to wait 5 sec, but when i put timer and type 5000 so it must be 5 sec, but it just past away in 1 sec, how to set it so it will be 5 sec ?
Anybody see my server: [Akatsuki]Konoha are pleased to come in. Why I choose that name? Because it just like in Naruto, got jutsu and mission based on Naruto's story. Sadly, only available for Friday, Saturday and Sunday. More sadly is maybe not available for 3 month starting from Jun.

Offline Doom

  • Made Man
  • ***
  • Posts: 105
    • View Profile
Re: set timer help
« Reply #1 on: July 07, 2013, 03:14:23 pm »

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: set timer help
« Reply #2 on: July 07, 2013, 03:45:18 pm »
MAKE your own if some error tell us !!!
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: set timer help
« Reply #3 on: July 07, 2013, 03:52:31 pm »
http://forum.vicecitymultiplayer.com/index.php?topic=5517.0

Seriously....


seriously doom??? is very easy repair the mistake and work the command... "but" is more players use the command whit a different of second... not work well.  now i turn on my computer for show the solution
« Last Edit: July 07, 2013, 03:54:25 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: set timer help
« Reply #4 on: July 07, 2013, 03:59:46 pm »
I dont know what you mean alejandro
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: set timer help
« Reply #5 on: July 07, 2013, 04:29:39 pm »
[pawn]new Heal[MAX_PLAYERS];[/pawn]


[pawn]              else if ( strcmp( cmd, "!heal", true ) == 0 )
   {
            tmp = strtok( cmdtext, idx );
            SendClientMessage(playerid,0x333AFFF,"Healing in 5 seconds for prevent death-evade.");
            SetTimer( "Healing", 5000,false);
         Heal[playerid] = 1;
      return 1;
   }[/pawn]


[pawn]//==============================================================================
public Healing() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Heal == 1) {
GameTextForPlayer(i,"Healed");
SetPlayerHealth(i,100);
Heal = 0;
      }
  }
      }
}
//==============================================================================[/pawn]
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline Doom

  • Made Man
  • ***
  • Posts: 105
    • View Profile
Re: set timer help
« Reply #6 on: July 07, 2013, 07:09:00 pm »
oh boy you're a Genius man...


how about if player 1 type heal and only 3 seconds passed, another player type !heal then the i loop will check all players with Heal == 1 so the player 2 just had to wait 2 secs for heal Bravo!

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: set timer help
« Reply #7 on: July 07, 2013, 08:48:51 pm »
oh boy you're a Genius man...

I wuz the first to discover passing functions for specific player using variables :P

how about if player 1 type heal and only 3 seconds passed, another player type !heal then the i loop will check all players with Heal == 1 so the player 2 just had to wait 2 secs for heal Bravo!

lol how does it matter, if the player has to wait 3 secs or 2 secs?


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: set timer help
« Reply #8 on: July 07, 2013, 08:49:35 pm »
oh boy you're a Genius man...


how about if player 1 type heal and only 3 seconds passed, another player type !heal then the i loop will check all players with Heal == 1 so the player 2 just had to wait 2 secs for heal Bravo!

yeah is right but i put in my command if player have $400 xD not all players have money for heal :D
IF YOU HAVE ANOTHER IDEA OF A COMMAND WHIT TIMER, PLEASE TELL US
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline Doom

  • Made Man
  • ***
  • Posts: 105
    • View Profile
Re: set timer help
« Reply #9 on: July 09, 2013, 09:10:58 am »
Yeah here is a perfect idea:

Wait for a good release which can support to pass player id in timer.


lol how does it matter, if the player has to wait 3 secs or 2 secs?

i think 2 secs are enough to evade death.

Offline heekz.shadow

  • LU testers
  • Made Man
  • *
  • Posts: 249
    • View Profile
Re: set timer help
« Reply #10 on: July 09, 2013, 02:14:35 pm »
I wuz the first to discover passing functions for specific player using variables :P

No you weren't, there were lots of scripters who done that before you.



oh boy you're a Genius man...


how about if player 1 type heal and only 3 seconds passed, another player type !heal then the i loop will check all players with Heal == 1 so the player 2 just had to wait 2 secs for heal Bravo!

yeah is right but i put in my command if player have $400 xD not all players have money for heal :D
IF YOU HAVE ANOTHER IDEA OF A COMMAND WHIT TIMER, PLEASE TELL US


You could store the tickcount for the player at heal and then compare with the one in the healing function. If it is over 4000 or 3000, then you can heal him. However I am not sure if pawn can do that.
Code: [Select]
[20:23] <habi> later only i heard that lu chatbox is customizable. On my first visit, it appeared ugly.
[20:23] <habi> May be that also be the reason why lu has no players

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: set timer help
« Reply #11 on: July 09, 2013, 06:45:11 pm »
nah I wuz, all rights r reserved


-Funniest quotes-

Quote from: asad3man
i cant able to understand