Question help
#10

This is what I mean, you haven't got the code required. You're going to need a timer, that covers updating the collection, and in that can also be the updating of the string that covers the textdraw.

PHP код:
format(collectstringsizeof(collectstring), "Collecting : %d"Collecting[playerid]); 
You will NEED collecting to be an array, otherwise only one person will have this, or, the same value will be shown to all.


Just beware, that usually when people request help in this manner, with the "examples" keyword, they actually have no code.



A tick timer, of 1 second, counting the collection up, and making the change to the textdraw string is what you need.

SickAttack has some bits for you as well. It won't count as such. It will, if the result from it is checked inside a timer.

Using a ticktimer, and simply counting up, is a simple method. The tick timer would be a script wide one, going through all players, and it should check if the player is collecting, and change the Collecting[playerid] accordingly.



Something which you may benefit from is the Turf system tutorials.

One that does cover a timer is https://sampforum.blast.hk/showthread.php?tid=467604 . The ZonesUpdate function, instead of looking at players, looks at zones. You'd need to remember that when looking at it, and make a similar function (Don't copy paste, use it as an example to show a for loop, and how to condition check for the collector) that covers the players instead.

You will get there, just make some portions of code, and show you can understand for loops, and timers.

Once you get those portions understood, things will become a lot easier for you.
Reply


Messages In This Thread
Question help - by ThatFag - 16.08.2016, 11:37
Re: Question help - by Sew_Sumi - 16.08.2016, 12:31
Re: Question help - by ThatFag - 16.08.2016, 15:37
Re: Question help - by Sew_Sumi - 16.08.2016, 15:51
Re: Question help - by ThatFag - 16.08.2016, 20:06
Re: Question help - by SickAttack - 16.08.2016, 20:28
Re: Question help - by ThatFag - 16.08.2016, 21:30
Re: Question help - by SickAttack - 16.08.2016, 22:21
Re: Question help - by ThatFag - 16.08.2016, 22:53
Re: Question help - by Sew_Sumi - 16.08.2016, 23:23

Forum Jump:


Users browsing this thread: 3 Guest(s)