Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: mrockxkingbutt 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]
-
Shit man will u stop this?
-
Shit man will u stop this?
what happend this is workable heal in 5 seconds
it is workable not like other timers
-
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.
-
man i didnot post this serval times
that i to help that guy
and this is workable
in 5 seconds
-
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
-
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.
-
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
-
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
-
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
-
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
-
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.
-
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
-
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
-
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
-
stromeus move it to snippet