SetTimerEx cannot Start
#1

im create SetTimerEx but timmer not start . this is my code

PHP код:
forward time(playerid)
public 
time(playerid)
{
SendClientMessage(playerid, -1"timer runing");

then im set timmer repeat at onplayerspawn

PHP код:
SetTimerEx("time"50001"i"playerid); 
why timmer cannot run?
Reply
#2

replace 1 with true
Reply
#3

yay im use true but still cannot runing
Reply
#4

Quote:
Originally Posted by ratxrat
Посмотреть сообщение
im create SetTimerEx but timmer not start . this is my code

PHP код:
forward time(playerid)
public 
time(playerid)
{
SendClientMessage(playerid, -1"timer runing");

then im set timmer repeat at onplayerspawn

PHP код:
SetTimerEx("time"50001"u"playerid); 
why timmer cannot run?
Try use Different Function name Like MyTime Then check

forward Mytime(playerid);
public Mytime(playerid)
{
SendClientMessage(playerid,-1,"Yay I'm Running");
return 1;
}

SetTimerEx("Mytime",5000,1,"u",playerid);
Reply
#5

this my complete script
PHP код:
forward lapartime(playerid);
forward laparupdate(playerid);
public 
lapartime(playerid)
{
 
tai[playerid] -=2;
 
SendClientMessage(playerid, -1"{00FF00}Average {FFFFFF}kurang 2");
}
public 
laparupdate(playerid)
{
    
SendClientMessage(playerid, -1"{00FF00}Average {FFFFFF}Biji besi, bawa ini kepengolahan.");
    if (
tai[playerid] >=100)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "IIIIIIIIII");

    }
    else if (
tai[playerid] <=90)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "IIIIIIIII");

    }
    else if (
tai[playerid] <=80)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "IIIIIIII");

    }
    else if (
tai[playerid] <=70)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "IIIIIII");

    }
    else if (
tai[playerid] <=60)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "IIIIII");

    }
    else if (
tai[playerid] <=50)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "IIIII");

    }
    else if (
tai[playerid] <=40)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "IIII");

    }
    else if (
tai[playerid] <=30)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "III");

    }
    else if (
tai[playerid] <=20)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "II");

    }
    else if (
tai[playerid] <=10)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], "I");

    }
    else if (
tai[playerid] <=0)
    {
        
PlayerTextDrawSetString(playeridTDEditor_PTD[playerid][11], " ");

    }


}
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" hunger, blader, drink");
    print(
"---by ratxrat-----\n");


    
    
    return 
1;
}




public 
OnPlayerConnect(playerid)
{
    
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid499.200012149.967208"box");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][0], 0.00000014.799995);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][0], 621.2006830.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][0], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][0], 1473249279);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][0], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][0], 4798030);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][0], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][0], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][0], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][0], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][0], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][0], 0);

    
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid498.899871149.873199"box");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][1], 0.00000014.959995);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][1], 498.3290100.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][1], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][1], -1);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][1], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][1], 92);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][1], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][1], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][1], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][1], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][1], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][1], 0);

    
TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid623.700561149.873199"box");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][2], 0.00000014.959995);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][2], 623.0000000.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][2], -1);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][2], 92);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][2], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][2], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][2], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][2], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][2], 0);

    
TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid498.602111149.713180"box");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][3], 0.000000, -0.000003);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][3], 621.0999750.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][3], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][3], -1);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][3], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][3], 92);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][3], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][3], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][3], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][3], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][3], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][3], 0);

    
TDEditor_PTD[playerid][4] = CreatePlayerTextDraw(playerid500.701934284.873626"box");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][4], 0.000000, -0.000003);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][4], 623.2004390.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][4], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][4], -1);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][4], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][4], 92);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][4], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][4], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][4], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][4], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][4], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][4], 0);

    
TDEditor_PTD[playerid][5] = CreatePlayerTextDraw(playerid560.749572126.433273"Rodolfo_Cadena");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][5], 0.4000001.600000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][5], 2);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][5], 255);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][5], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][5], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][5], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][5], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][5], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][5], 0);

    
TDEditor_PTD[playerid][6] = CreatePlayerTextDraw(playerid463.399993101.763221"");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][6], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][6], 123.000000138.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][6], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][6], -1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][6], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][6], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][6], 0);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][6], 5);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][6], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][6], 0);
    
PlayerTextDrawSetPreviewModel(playeridTDEditor_PTD[playerid][6], 2860);
    
PlayerTextDrawSetPreviewRot(playeridTDEditor_PTD[playerid][6], 79.0000000.000000341.0000002.042606);

    
TDEditor_PTD[playerid][7] = CreatePlayerTextDraw(playerid472.224639158.396652"");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][7], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][7], 94.00000084.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][7], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][7], -1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][7], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][7], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][7], 0);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][7], 5);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][7], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][7], 0);
    
PlayerTextDrawSetPreviewModel(playeridTDEditor_PTD[playerid][7], 1546);
    
PlayerTextDrawSetPreviewRot(playeridTDEditor_PTD[playerid][7], 20.0000000.00000043.0000002.205513);

    
TDEditor_PTD[playerid][8] = CreatePlayerTextDraw(playerid488.199859215.480026"");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][8], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][8], 47.00000033.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][8], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][8], -1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][8], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][8], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][8], 0);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][8], 5);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][8], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][8], 0);
    
PlayerTextDrawSetPreviewModel(playeridTDEditor_PTD[playerid][8], 2514);
    
PlayerTextDrawSetPreviewRot(playeridTDEditor_PTD[playerid][8], 0.0000000.00000064.0000001.000000);

    
TDEditor_PTD[playerid][9] = CreatePlayerTextDraw(playerid498.399719251.373428"");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][9], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][9], 45.00000032.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][9], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][9], -1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][9], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][9], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][9], 0);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][9], 5);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][9], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][9], 0);
    
PlayerTextDrawSetPreviewModel(playeridTDEditor_PTD[playerid][9], 1274);
    
PlayerTextDrawSetPreviewRot(playeridTDEditor_PTD[playerid][9], 0.0000000.000000178.0000001.000000);

    
TDEditor_PTD[playerid][10] = CreatePlayerTextDraw(playerid552.398864186.599685"HAUS");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][10], 0.3543992.996263);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][10], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][10], 16764155);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][10], 56);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][10], -2);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][10], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][10], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][10], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][10], 56);

    
TDEditor_PTD[playerid][11] = CreatePlayerTextDraw(playerid552.300170157.179595" ");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][11], 0.3543992.996263);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][11], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][11], 16764155);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][11], 56);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][11], -2);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][11], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][11], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][11], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][11], 56);

    
TDEditor_PTD[playerid][12] = CreatePlayerTextDraw(playerid539.800842260.579864"$20000000");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][12], 0.4000001.600000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][12], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][12], -1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][12], 1);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][12], 1);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][12], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][12], 3);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][12], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][12], 1);

    
TDEditor_PTD[playerid][13] = CreatePlayerTextDraw(playerid499.800079129.519973"box");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][13], 0.0000001.195994);
    
PlayerTextDrawTextSize(playeridTDEditor_PTD[playerid][13], 622.3502190.000000);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][13], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][13], -1);
    
PlayerTextDrawUseBox(playeridTDEditor_PTD[playerid][13], 1);
    
PlayerTextDrawBoxColor(playeridTDEditor_PTD[playerid][13], 2092025726);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][13], 0);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][13], 0);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][13], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][13], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][13], 1);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][13], 0);

    
TDEditor_PTD[playerid][14] = CreatePlayerTextDraw(playerid552.499023216.913146"PIPIS");
    
PlayerTextDrawLetterSize(playeridTDEditor_PTD[playerid][14], 0.3543992.996263);
    
PlayerTextDrawAlignment(playeridTDEditor_PTD[playerid][14], 1);
    
PlayerTextDrawColor(playeridTDEditor_PTD[playerid][14], 16764155);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][14], 56);
    
PlayerTextDrawSetOutline(playeridTDEditor_PTD[playerid][14], -2);
    
PlayerTextDrawBackgroundColor(playeridTDEditor_PTD[playerid][14], 255);
    
PlayerTextDrawFont(playeridTDEditor_PTD[playerid][14], 1);
    
PlayerTextDrawSetProportional(playeridTDEditor_PTD[playerid][14], 0);
    
PlayerTextDrawSetShadow(playeridTDEditor_PTD[playerid][14], 56);
    
tai[playerid]=100;
    return 
1;
}

public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}

public 
OnPlayerSpawn(playerid)
{
    
SetTimerEx("lapartime"100001"i"playerid);
    
SetTimerEx("laparupdate"50001"i"playerid);
    for (new 
x=x<20 x++)
    
PlayerTextDrawShow(playeridTDEditor_PTD[playerid][x]);
    return 
1;

Reply
#6

add return 1;
Reply
#7

Just some test code (it does send the message):
pawn Код:
public OnPlayerConnect(playerid)
{
    SetTimerEx("timer", 5000, true, "i", playerid);
    return 1;
}

forward timer(playerid);
public timer(playerid)
{
    SendClientMessage(playerid, -1, "timer runing");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)