Timer Does not work.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Timer Does not work.. (
/showthread.php?tid=246228)
Timer Does not work.. -
RenisiL - 03.04.2011
Hey, I do not understand why I do not work timers
Код:
SetTimerEx( "Kompiuterio_Krovimas" ,9000 , false, "i" , playerid );
Код:
public Kompiuterio_Krovimas( playerid )
{
//------------------------------------------------------
print("Aktyvuota Funkcija: Kompiuterio_Krovimas");
//------------------------------------------------------
new
Kraunama
;
if( PlayerData[ playerid ][ Komputeris_Samsung ] )
{
Kraunama = floatround( ( 50 / 5 ) + random( 2 ) );
}
if( PlayerData[ playerid ][ Kompiuteris_Dell_Inspiron ] )
{
Kraunama = floatround( ( 50 / 5 ) + random( 7 ) );
}
if( PlayerData[ playerid ][ Kompiuteris_Toshiba_Satellite ] )
{
Kraunama = floatround( ( 50 / 5 ) + random( 10 ) );
}
if( PlayerData[ playerid ][ Kompiuteris_HP_Mini ] )
{
Kraunama = floatround( ( 50 / 5 ) + random( 14 ) );
}
PlayerData[ playerid ][ Kompiuterio_Baterija ]+= Kraunama;
if( PlayerData[ playerid ][ Kompiuterio_Baterija ] > 100 ) //100 procentų baterijos
{
SendClientMessage( playerid,COLOR_BALTA, " "HEX_RAUDONA"- "HEX_BALTA"Jūsų kompiuteris pilnai pakrautas" );
}
return true;
}
Re: Timer Does not work.. -
RenisiL - 03.04.2011
anyone?
Re: Timer Does not work.. -
SlashPT - 03.04.2011
try to change to
pawn Код:
SetTimerEx( "Kompiuterio_Krovimas" ,9000 , true, "i" , playerid );
and where are you putting that??
Re: Timer Does not work.. -
RenisiL - 03.04.2011
Does not work ;/
Re: Timer Does not work.. -
Marricio - 03.04.2011
pawn Код:
forward Kompiuterio_Krovimas(playerid);
Re: Timer Does not work.. -
RenisiL - 03.04.2011
Everything is in place. but not all server timers does not work
Re: Timer Does not work.. -
iJumbo - 03.04.2011
where did you put the timer? what callback / function?
mmmm
Re: Timer Does not work.. -
RenisiL - 03.04.2011
public OnFilterScriptInit()
Re: Timer Does not work.. -
SlashPT - 03.04.2011
you joking with us? how would that work if you don't even have the "playerid" ??
Re: Timer Does not work.. -
RenisiL - 03.04.2011
Need, I use the timer function, which is an individual player
Re: Timer Does not work.. -
RenisiL - 03.04.2011
SetTimer and does not work.