Raised This Month: $ Target: $400
 0% 

Help with the flashlight


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jediZEr0
Member
Join Date: Jan 2009
Location: In the Middle of Nowhere
Old 02-01-2009 , 10:50   Help with the flashlight
Reply With Quote #1

I'm trying to make a rechargeable flashlight so when you type /battery it would recharge it. The problem is that when I type /battery it stays recharged just for 1-2 seconds. I used this code:
Code:
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("Flashlight"), _, id) 
write_byte(1)
write_byte(100)
message_end()
jediZEr0 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-01-2009 , 11:15   Re: Help with the flashlight
Reply With Quote #2

You don't need to send a message.
Do only :

set_pdata_int(id, 244, 99)

See pdata list here : http://forums.alliedmods.net/showthread.php?t=68113
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
jediZEr0
Member
Join Date: Jan 2009
Location: In the Middle of Nowhere
Old 02-01-2009 , 11:21   Re: Help with the flashlight
Reply With Quote #3

hey thanks! There are lots of functions that i don't know...
jediZEr0 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 01:40.


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