Raised This Month: $ Target: $400
 0% 

how to make things by timing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
king999
Member
Join Date: Feb 2015
Location: Mars
Old 03-01-2015 , 13:43   how to make things by timing
Reply With Quote #1

so guys i made a project of knife vip
but vips can select all the items at once but how to make it once by once
mean the can select 1 item only in 60 sec
after 60 sec they can select other item
for example knife hammer has extra damage
and chain saw has speed
they both are different item
and people selects it at once
but i want that they can use only one item in 60 sec
king999 is offline
Send a message via Skype™ to king999
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-01-2015 , 14:15   Re: how to make things by timing
Reply With Quote #2

There are functions to retrieve time. Set the time that they get an item into a variable and check current time minus that time to see if its been 60 seconds. Or, if you automatically remove the item after 60 seconds, just check to see that their item is empty/nothing before allowing them to get a new item.
__________________
Bugsy is offline
king999
Member
Join Date: Feb 2015
Location: Mars
Old 03-01-2015 , 16:05   Re: how to make things by timing
Reply With Quote #3

brow i already know that
like set_task
thats the command but i dont know how to make it that they cant choose other item
king999 is offline
Send a message via Skype™ to king999
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-01-2015 , 16:17   Re: how to make things by timing
Reply With Quote #4

I assume this is in regards to the plugin I already helped you with.

The players current knife class is stored in g_knife_cclass[]. When that knife class ends, you need to set it to a normal status\class.

PHP Code:
enum
{
    
NORMAL,  //Player has nothing
    
WOLF,    //Player has WOLF
    
AXE      //Player has AXE

When the player gets a class, it is set to WOLF or AXE. After 60 seconds in your Remove1 function, set g_knife_cclass[ id ] = NORMAL.

When a player tries to get a new class, do:
PHP Code:
if ( g_knife_cclassid ] != NORMAL )
{
     
client_printid print_chat "* Sorry, you already have a class" );
     return;

__________________

Last edited by Bugsy; 03-01-2015 at 17:53.
Bugsy is offline
king999
Member
Join Date: Feb 2015
Location: Mars
Old 03-01-2015 , 17:25   Re: how to make things by timing
Reply With Quote #5

ok sir i will try this
king999 is offline
Send a message via Skype™ to king999
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 01:42.


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