Timer Problem
#3

pawn Код:
new Float:RandomSpawn[][] =
{
    {1945.9650, 152.9478, 37.0099},
    {1880.4320, 247.6804, 27.2093},
    {2019.9969, 274.9753, 28.5537}
}, RandomPickupid;
pawn Код:
//OnGameModeInit
    CreatePickupAtRandPos(1242);
pawn Код:
//OnPlayerPickUpPickup(playerid, pickupid)
    if(pickupid == RandomPickupid)
    {
        DestroyPickup(RandomPickupid);
        GivePlayerMoney(playerid, 12_500);
        SetTimerEx("CreatePickupAtRandPos", 30_000, false, "i", 1242);
    }
pawn Код:
forward CreatePickupAtRandPos(modelid);
public CreatePickupAtRandPos(modelid)
{
    new rand = random(sizeof RandomSpawn);
    RandomPickupid = CreatePickup(modelid, 3, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
}
Reply


Messages In This Thread
Timer Problem - by nesty - 03.02.2009, 21:15
Re: Timer Problem - by ICECOLDKILLAK8 - 03.02.2009, 21:25
Re: Timer Problem - by Nero_3D - 03.02.2009, 21:27
Re: Timer Problem - by nesty - 04.02.2009, 00:35

Forum Jump:


Users browsing this thread: 1 Guest(s)