Timer Does not work..
#1

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;
}
Reply
#2

anyone?
Reply
#3

try to change to
pawn Код:
SetTimerEx( "Kompiuterio_Krovimas" ,9000 , true,  "i" , playerid );
and where are you putting that??
Reply
#4

Does not work ;/
Reply
#5

pawn Код:
forward Kompiuterio_Krovimas(playerid);
Reply
#6

Everything is in place. but not all server timers does not work
Reply
#7

where did you put the timer? what callback / function?


mmmm
Reply
#8

public OnFilterScriptInit()
Reply
#9

you joking with us? how would that work if you don't even have the "playerid" ??
Reply
#10

Need, I use the timer function, which is an individual player
Reply
#11

SetTimer and does not work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)