View Single Post
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 05-24-2017 , 22:45   Re: Using CreateDataTimer
Reply With Quote #21

Quote:
Originally Posted by WildCard65 View Post
Yeap, definitely your problem, I repeat, CreateDatatTimer CREATES A DataPack HANDLE FOR YOU TO FILL!

example:
PHP Code:
DataPack myPack;
CreateDataTimer(5.0MyTimermyPack);
myPack.WriteFloat(5.0); // Write a float to the datapack the timer WILL receive. 
I'm sorry but I'm having a hard time understanding. If my timer can only have one datapack argument then how do I pass another datapack to it?

Code:
 public Action:ArtilleryExplosionTimer(Handle:timer, Handle:datapack)
I tried
Code:
 public Action:ArtilleryExplosionTimer(Handle:timer, Handle:datapack, Handle:datapack2)
but only got a compiler error. And if I only call the command once then it gets that one value stores it in the datapack and sends it to the timer. Therefore I cannot add more data unless I run the command again.

Last edited by Halt; 05-24-2017 at 22:46.
Halt is offline