09.02.2009, 22:22
I changed the time to a higher one but no effect and when i put the timer in a command the timer has no effect
here my whole idea
timer dosent work
here my whole idea
pawn Код:
forward CreatePickupAtRandPos(modelid);
pawn Код:
new Float:RandomSpawn[][] =
{
{2211.2908,2472.7927,10.8203},
{2191.8694,2500.7825,10.8203},
{2181.1367,2488.4922,10.8203},
{2213.7810,2494.0610,10.8203},
{2202.3906,2474.9817,10.8203},
{2193.9182,2472.9346,10.8203}
}, RandomPickupid;
pawn Код:
//public OnGameModeInit()
SetTimer("CreatePickupAtRandPos", 60_000, false);
CreatePickupAtRandPos(1550);
pawn Код:
public CreatePickupAtRandPos(modelid)
{
new rand = random(sizeof RandomSpawn);
RandomPickupid = CreatePickup(modelid, 3, RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == RandomPickupid)
{
DestroyPickup(RandomPickupid);
GivePlayerMoney(playerid, 15_000);
SetTimerEx("CreatePickupAtRandPos", 30_000, false, "i", 1550);
// and some TextDraws
}
return 1;
}

