Raised This Month: $ Target: $400
 0% 

Read FLOAT from file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-15-2013 , 06:53   Re: Read FLOAT from file
Reply With Quote #1

Because set_task can't pass variables like that. You have to think a bit before doing something randomly.

What is the set_task header ? :

native set_task(Float:time,const function[],id = 0,const parameter[]="",len = 0,const flags[]="" );

id, is supposed to be the Task id.
parameter, is an array where you can pass any data to the callback.

Here, you can do something like : set_task(10.0, "task_Announce", 12654, r_origin, sizeof r_origin );

Callback should look like : public task_Announce( taskid, data[] )

Then you can do Float:data0], Float:data[1] and Float:data[2] to retrieve value.
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-15-2013 , 06:57   Re: Read FLOAT from file
Reply With Quote #2

Just a little correction,

tasks callbacks look like this :

When you don't pass args :
PHP Code:
public FunctionNameTaskIndex 
When you don't pass index :
PHP Code:
public FunctionNameArgs[] ) 
When you pass index and args :
PHP Code:
public FunctionNameArgs[], Index 
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode