Raised This Month: $ Target: $400
 0% 

Random task time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-27-2010 , 06:16   Random task time
Reply With Quote #1

i can't make radnom number for set_task(randomtime, "tralalala", id)
i tried random_num, random_float and just random
every time i get tag mismatch
any idea how to do this in a simple way?

Last edited by OvidiuS; 12-27-2010 at 06:20.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-27-2010 , 06:21   Re: Random task time
Reply With Quote #2

random_float()
__________________
Arkshine is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-27-2010 , 06:22   Re: Random task time
Reply With Quote #3

i tried, but i get tag mismatch
OvidiuS is offline
Send a message via Skype™ to OvidiuS
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 12-27-2010 , 06:22   Re: Random task time
Reply With Quote #4

Before, you had some code here... You forgot to Float: tag your variable.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-27-2010 , 06:24   Re: Random task time
Reply With Quote #5

PHP Code:
{    
    new 
Float:min[4], max[4];

    
min[3] = 20.0;
    
max[3] = 40.0;

    new 
random random_float(min[3], max[3]); 
OvidiuS is offline
Send a message via Skype™ to OvidiuS
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-27-2010 , 06:24   Re: Random task time
Reply With Quote #6

random_float(1, 10) Tag Mismatch

random_float(1.0, 10.0) Wow, it works !!!!!
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 12-27-2010 , 06:24   Re: Random task time
Reply With Quote #7

Quote:
Originally Posted by DarkGod View Post
Float: tag your variable.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-27-2010 , 06:24   Re: Random task time
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
random_float(1, 10) Tag Mismatch

random_float(1.0, 10.0) Wow, it works !!!!!
no it doesn't, i tried

PHP Code:
    new random random_float(20.040.0);

    
set_task(random"check"client); 
it didn''t worked
OvidiuS is offline
Send a message via Skype™ to OvidiuS
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 12-27-2010 , 06:26   Re: Random task time
Reply With Quote #9

I give up.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-27-2010 , 06:27   Re: Random task time
Reply With Quote #10

new Float:random ... or set_task( random_float(20.0, 40.0), "check", client); ...
__________________
Arkshine 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:24.


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