Help with timer ! :)
#1

I need a litlle help with making a timer so that every 1 minute will show random text
and I need a help making some pickup gone after 5 seconds.

Thanks for the help !
Reply
#2

come on no-one knows it ?
1. Making random text every 1 minute
2. Destroying pickup after 5 seconds with timer

Reply
#3

SetTimer("YourFuncName",60000,1);

public YourFuncName()
{
// Random text here.
}



For pickups use
GameTextForPlayer(playerid,"Text",5000,3);
Reply
#4

Quote:

SetTimer("YourFuncName",60000,1);

I need to put Timer on OnGameModeInit .. right ?


Quote:

For pickups use
GameTextForPlayer(playerid,"Text",5000,3);

No I want that after 5 seconds my pickup will be gone after it was created.
Reply
#5

Here's something for that pickup.

pawn Код:
forward DestroyPickupEx(pickup);
public DestroyPickupEx(pickup) { DestroyPickup(pickup); }
Now for triggering the code:

pawn Код:
new pickup = CreatePickup(parameter crap); //For example, this is where you create your pickup, and assign the ID to 'pickup'.
SetTimerEx("DestroyPickupEx", 5*1000, 0, "d", pickup); //Set the timer to destroy it again.
Hope it's useful, ask if you encounter any problems.
Reply
#6

pawn Код:
forward DestroyPickupEx(pickup);
public DestroyPickupEx(pickup) { DestroyPickup(pickup); }
When I put that in my script I just get a lot of errors ^ !
Reply
#7

I fixed all errors right now, now I am going to test if it works !
Reply
#8

Pickup is not gone after 5 seconds !
Reply
#9

Where did you place your code? (Paste it pl0x)
Reply
#10

- REMOVED -
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)