SA-MP Forums Archive
Call a function - 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: Call a function (/showthread.php?tid=89095)



Call a function - nesty - 30.07.2009

Simple question how can I call a function without using a timer?


Re: Call a function - Westie - 30.07.2009

In what way?


Re: Call a function - nesty - 30.07.2009

I mean like this...
pawn Код:
public LOOOL()
{

    SendPlayerFormattedText(playerid,"Virtual World 2", 0);

    return 1;
   
}
pawn Код:
public LOOOL2(playerid)
{

    new world_id;
    world_id = GetPlayerVirtualWorld(playerid);

    if(world_id == 1)
    {

    SendPlayerFormattedText(playerid,"Virtual World 1", 0);

    }

    else if(world_id == 2)
    {

    SetTimer("LOOOL", 1000, false); // I dont want to use this timer

    }

    return 1;
}
hope u understand my problem


Re: Call a function - D3nnis - 30.07.2009

What about:
pawn Код:
public LOOOL2(playerid)
{

    new world_id;
    world_id = GetPlayerVirtualWorld(playerid);

    if(world_id == 1)
    {

    SendPlayerFormattedText(playerid,"Virtual World 1", 0);

    }

    else if(world_id == 2)
    {

    LOOOL();

    }

    return 1;
}
?

I hope this will help you


Re: Call a function - Jefff - 30.07.2009

removed


Re: Call a function - D3nnis - 30.07.2009

Quote:
Originally Posted by Jefff
Код:
public LOOOL2()
:P
What do you mean by what?

I know that your functions are only examples, but there are a few errors^^
pawn Код:
public LOOOL(playerid)
{

    SendPlayerFormattedText(playerid,"Virtual World 2", 0);

    return 1;
   
}
pawn Код:
public LOOOL2(playerid)
{

    new world_id;
    world_id = GetPlayerVirtualWorld(playerid);

    if(world_id == 1)
    {

    SendPlayerFormattedText(playerid,"Virtual World 1", 0);

    }

    else if(world_id == 2)
    {

    LOOOL(playerid); // Without timer

    }

    return 1;
}
now I guess it's right


Re: Call a function - nesty - 31.07.2009

sorry but what u wrote doesn't work
pawn Код:
LOOOL();
some1 can help pls


Re: Call a function - nesty - 31.07.2009

ok if this doesn#T work i use timer
How many timers I can use maybe over 1000?