AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with the flashlight (https://forums.alliedmods.net/showthread.php?t=84817)

jediZEr0 02-01-2009 10:50

Help with the flashlight
 
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()


ConnorMcLeod 02-01-2009 11:15

Re: Help with the flashlight
 
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

jediZEr0 02-01-2009 11:21

Re: Help with the flashlight
 
hey thanks! There are lots of functions that i don't know...


All times are GMT -4. The time now is 01:40.

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