How to set a timer to start 20 seconds after the player spawns?
#2

Create another function that sets the that timer (saveweapon). Then OnPlayerSpawn set a timer (new one) for 20 seconds that calls the function (the one you created).
Untested
pawn Код:
// Top of script
forward DelayTimer(/*playerid*/);

public DelayTimer(/*playerid*/)
{
    /*new
        name[20];

    GetPlayerName(playerid, name, 20);
    printf("[Update] Player %s has spawned, and retreived their weapons!", Name);*/

    SetTimer("saveweapon", 1000, true);
    return true;
}

public OnPlayerSpawn(playerid)
{
    SetTimer("DelayTimer(/*playerid*/)", 20000, false); // My bad =P
    return true;
}
Reply


Messages In This Thread
How to set a timer to start 20 seconds after the player spawns? - by Nakash - 11.12.2009, 11:24
Re: How to set a timer to start 20 seconds after the player spawns? - by Abernethy - 11.12.2009, 11:30
Re: How to set a timer to start 20 seconds after the player spawns? - by Nakash - 11.12.2009, 11:33
Re: How to set a timer to start 20 seconds after the player spawns? - by Abernethy - 11.12.2009, 11:34
Re: How to set a timer to start 20 seconds after the player spawns? - by Nakash - 11.12.2009, 11:50

Forum Jump:


Users browsing this thread: 1 Guest(s)