Raised This Month: $ Target: $400
 0% 

adding time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-13-2012 , 07:05   adding time
Reply With Quote #1

can i know how can i add time to someone and remove time from someone (just the code)
yamin is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-13-2012 , 07:08   Re: adding time
Reply With Quote #2

Make a global array variable like:

PHP Code:
new user_time[33
And then use it with the player index...

PHP Code:
user_time[id//... += to add and -= to substract value 
__________________

Last edited by <VeCo>; 05-13-2012 at 07:08.
<VeCo> is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-13-2012 , 09:05   Re: adding time
Reply With Quote #3

Quote:
Originally Posted by <VeCo> View Post
Make a global array variable like:

PHP Code:
new user_time[33
And then use it with the player index...

PHP Code:
user_time[id//... += to add and -= to substract value 
can you give the full code
yamin is offline
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 05-13-2012 , 07:13   Re: adding time
Reply With Quote #4

lol, he need full code
__________________
The functional way is the right way
GordonFreeman (RU) is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-13-2012 , 09:01   Re: adding time
Reply With Quote #5

Quote:
Originally Posted by GordonFreeman (RU) View Post
lol, he need full code
gordon i was asking to help you
yamin is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-13-2012 , 09:08   Re: adding time
Reply With Quote #6

Don't make double posts.

I didn't understand you what exactly is that "time" and what exaclty are you trying to do...

Here's a strange example with commands that add +1/-1 to the user_time, but I don't know what do you want...

PHP Code:
#include <amxmodx>
 
new user_time[33]
public 
plugin_init()
{
register_clcmd("say /timeadd","time_add")
register_clcmd("say /timesub","time_substract")
}
 
public 
time_add(iduser_time[id]++ //add 1 time (???)
public time_substract(iduser_time[id]-- //substract 1 time (???) 
__________________
<VeCo> is offline
yamin
BANNED
Join Date: Jan 2012
Location: Sharjah
Old 05-13-2012 , 09:18   Re: adding time
Reply With Quote #7

Quote:
Originally Posted by <VeCo> View Post
Don't make double posts.

I didn't understand you what exactly is that "time" and what exaclty are you trying to do...

Here's a strange example with commands that add +1/-1 to the user_time, but I don't know what do you want...

PHP Code:
#include <amxmodx>
 
new user_time[33]
public 
plugin_init()
{
register_clcmd("say /timeadd","time_add")
register_clcmd("say /timesub","time_substract")
}
 
public 
time_add(iduser_time[id]++ //add 1 time (???)
public time_substract(iduser_time[id]-- //substract 1 time (???) 
thanks
yamin is offline
Old 05-13-2012, 12:49
yamin
This message has been deleted by yamin.
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 00:20.


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