Function question
#1

Does there happen to be a function named "DoesPlayerHaveATimerRunning" or something like that? I need it for a server i'm making, I know there's a way of assigning a variable through every single timer, but i'd rather not do so.

Thanks,

sizeof.

EDIT: Bleh, wrong section, meant to be Scripting Discussion.
Reply
#2

The variable technique is really the only way of doing it unfortunately. But you could create a function called CreatePlayerTimer, which assigns an ID to the player in question using the ID of the timer, then when the timer expires, it carries out the desired affect on the player in the server with timer[playerid] set as the timer ID
Reply
#3

Quote:
Originally Posted by Y_Leѕѕ
There's no such thing as a player timer, so no. You need to get your concepts straight before asking for functions like that.
...I didn't mean it literally, say I set their timer, I want to check if the timer is ACTUALLY running.

EDIT: Read redgies post.. Thanks, i'll do that, then.
Reply
#4

In the code the timer is checking you can put print("timer is running"); and it will show in the server window timer is running..Hope this helps you out!
Quote:
Originally Posted by sizeof(Sky));
Quote:
Originally Posted by Y_Leѕѕ
There's no such thing as a player timer, so no. You need to get your concepts straight before asking for functions like that.
...I didn't mean it literally, say I set their timer, I want to check if the timer is ACTUALLY running.

EDIT: Read redgies post.. Thanks, i'll do that, then.
Reply
#5

the only way to make ur own callbacks is to make an inc file and make natives of what that callback is gonna do
Reply
#6

1. it doesn't have to be in an include file
2. if you are making your custom functions native i might shoot you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)