· 6 years ago · Aug 19, 2019, 06:43 PM
1/*
2 make OnEquipped and OnUnequipped for non-custom weapons?
3 make hooked functions use tables? (like VSLib)
4 use multiple timers to reduce long hangs?
5 add response rule library?
6 migrate to using EntFire?
7*/
8
9/*options
10fire custom weapon while restricted (default is off)
11print debug info (default is on)
12*/
13
14/* Documentation
15table Keys - Contains all possible key inputs
16table VariableTypes - Contains all possible variable types
17table Characters - Contains a few characters for cleaner code
18table Flags - Contains bit positions for m_fFlags
19table RenderFX - Contains render effect types
20table EntityEffects - Contains bit positions for entity effects
21table RenderModes - Contains render modes
22table MoveTypes - Contains player move types
23table DamageTypes - Contains bit positions for damage types
24table SolidTypes - Contains solidity types
25table SolidFlags - Contains bit positions for solidity flags
26table MoveCollide - Contains move collide types
27table CollisionGroups - Contains collision group types
28table TraceContent - Contains bit positions for trace content flags
29table TraceMasks - Contains trace mask types
30table BotCommands - Contains bot command types
31table BotSense - Contains bit positions for bot sense flags
32table HUDPositions - Contains enumerated HUD positions
33table HUDFlags - Contains bit positions for HUD flags
34table ZombieTypes - Contains zombie types
35function ImprovedMethodsIncluded() - Checks if ImprovedMethods is fully included
36 returns: bool included
37function IncludeImprovedMethods() - Adds extra methods that can be called on entity handles
38function RegisterFunctionListener(function checkFunction, function callFunction, table args, bool singleUse) - Registers a listener that waits for the checkFunction to return true
39 returns: bool success
40 calls:
41 callFunction()
42 arguments:
43 checkFunction - function called to check whether to return true or false
44 callFunction - function called when checkFunction returns true
45 args - table with args that checkFunction can use
46 singleUse - should this listener be removed after calling callFunction
47
48function RegisterCustomWeapon(string viewmodel, string worldmodel, string script) - Registers a custom weapon script
49 returns: bool success
50 calls:
51 OnInitialize() - called when done registering
52 OnTick() - called every server tick
53 OnReleased(entity playerWeapon, entity player) - called when a player is no longer restricted from using the custom weapon
54 OnRestricted(entity playerWeapon, entity player) - called when a player becomes restricted from using the custom weapon
55 OnPickup(entity newWeapon, entity player) - called when a player picks up the custom weapon
56 OnDrop(entity droppedWeapon, entity player) - called when a player drops the custom weapon
57 OnInventoryChange(entity player, array droppedWeapons, array newWeapons) - called when a player's inventory changes
58 OnKeyPressStart_key(entity weapon, entity player)
59 OnKeyPressTick_key(entity weapon, entity player)
60 OnKeyPressEnd_key(entity weapon, entity player)
61 see RegisterHooks for key names
62 arguments:
63 viewmodel - path to viewmodel file
64 worldmodel - path to worldmodel file
65 script - script name to include
66function RegisterHooks(table scriptScope) - Registers various misc hooks
67 returns: bool success
68 calls:
69 OnTick() - called every tick
70 OnInventoryChange(entity player, array droppedWeapons, array newWeapons) - called when a player's inventory changes
71 OnKeyPressStart_key(entity weapon, entity player) and OnKeyPressTick_key(entity weapon, entity player) and OnKeyPressEnd_key(entity weapon, entity player)
72 keys:
73 Attack
74 Jump
75 Crouch
76 Forward
77 Backward
78 Use
79 Cancel
80 Left
81 Right
82 MoveLeft
83 MoveRight
84 Attack2
85 Run
86 Reload
87 Alt1
88 Alt2
89 Showscores
90 Speed
91 Walk
92 Zoom
93 Weapon1
94 Weapon2
95 Bullrush
96 Grenade1
97 Grenade2
98 Lookspin
99 arguments:
100 scriptScope - scope to call the functions in
101function RegisterOnTick(table scriptScope) - Registers a hook called every tick
102 returns: bool success
103 calls:
104 OnTick() - called every tick
105 arguments:
106 scriptScope - scope to call the OnTick function in
107function RegisterTickFunction(function func) - Registers a function to be called every tick
108 returns: bool success
109 calls:
110 func()
111 arguments:
112 func - function to be called every tick
113
114function RegisterEntityCreateListener(string classname, table scope) - Registers a listener to check for entity spawning/creation
115 returns: bool success
116 calls:
117 OnEntCreate_classname(entity ent) - called when a new entity with the specified classname is created
118 arguments:
119 classname - the class name to listen for spawning
120 scope - scope to call the OnEntCreate_classname function in
121
122function RegisterEntityMoveListener(entity ent, table scope) - Registers a listener to watch for movement on ent
123 returns: bool success
124 calls:
125 OnEntityMove(entity ent) - called when the ent moves
126 arguments:
127 ent - entity to watch for movement
128 scope - scope to call the OnEntityMove function in
129function RegisterTimer(table hudField, float time, function callFunction, bool countDown = true, bool formatTime = false) - Registers a HUD timer
130 returns: bool success
131 calls:
132 callFunction()
133 arguments:
134 hudField - hud field to use as timer
135 time - time to count down or up to
136 callFunction - function called when time is reached
137 countDown - should count down or up
138 formatTime - should format time as mm:ss
139
140function StopTimer(table hudField) - Stops a currently running timer
141 returns: bool success
142 arguments:
143 hudField - hud field already used as a timer
144
145function ScheduleTask(function func, float time, table args = {}, bool timestamp = false) - Registers a task to execute in the future
146 returns: bool success
147 calls:
148 func()
149 arguments:
150 func - function to be called when time is reached
151 time - time to wait (or timestamp)
152 args - table with variables that can be used by func
153 timestamp - interpret time as a timestamp
154
155function DoNextTick(function func, table args = {}) - Registers a task to execute next tick
156 returns: bool success
157 calls:
158 func()
159 arguments:
160 func - function to be called when time is reached
161 args - table with variables that can be used by func
162
163function RegisterChatCommand(string command, function func, bool isInputCommand = false) - Registers a chat command
164 returns: bool success
165 calls:
166 func(entity ent) or func(entity ent, string input)
167 arguments:
168 command - text to respond to
169 func - function to be called when someone types the chat command
170 isInputCommand - if the command should check for input after the command string
171function RegisterConvarListener(string convar, string convarType, table|instance scope) - Registers a listener for a convar
172 returns: bool success
173 calls:
174 OnConvarChange_convar(string|float previousValue, string|float newValue)
175 arguments:
176 convar - convar to watch for changes
177 convarType - type of convar (string or float)
178 scope - scope to call the OnConvarChange_convar function in
179function RegisterBileExplodeListener(table scope) - Registers a listener for biles exploding
180 returns: bool success
181 calls:
182 OnBileExplode(entity thrower, vector startPosition, vector position)
183 arguments:
184 scope - scope to call the OnBileExplode function in
185
186function RegisterMolotovExplodeListener(table scope) - Registers a listener for molotovs exploding
187 returns: bool success
188 calls:
189 OnMolotovExplode(entity thrower, vector startPosition, vector position)
190 arguments:
191 scope - scope to call the OnMolotovExplode function in
192function LockEntity(entity ent) - Locks an entity by constantly setting its origin
193 returns: bool success
194 arguments:
195 ent - entity to lock
196
197function LockEntity(entity ent) - Unlocks a previously locked entity
198 returns: bool success
199 arguments:
200 ent - entity to unlock
201function SetTimescale(float timescale) - Sets server timescale
202 returns: bool success
203 arguments:
204 timescale - desired timescale
205
206function PlayerGenerator() - Generator function that returns players
207 returns: entity player
208
209function EntitiesByClassname(string classname) - Generator function that returns entities by classname
210 returns: entity ent
211 arguments:
212 classname - classname to search for
213
214function EntitiesByClassnameWithin(string classname, vector origin, float radius) - Generator function that returns entities by classname within a radius
215 returns: entity ent
216 arguments:
217 classname - classname to search for
218 origin - position to search around
219 radius - radius around origin to search
220
221function EntitiesByModel(string model) - Generator function that returns entities by model
222 returns: entity ent
223 arguments:
224 model - model to search for
225
226function EntitiesByName(string name) - Generator function that returns entities by name
227 returns: entity ent
228 arguments:
229 name - name to search for
230
231function EntitiesByNameWithin(string name, vector origin, float radius) - Generator function that returns entities by name within
232 returns: entity ent
233 arguments:
234 name - name to search for
235 origin - position to search around
236 radius - radius around origin to search
237function EntitiesByTarget(string targetname) - Generator function that returns entities by target
238 returns: entity ent
239 arguments:
240 targetname - name of target
241function EntitiesInSphere(vector origin, float radius) - Generator function that returns entities in the sphere
242 returns: entity ent
243 arguments:
244 origin - position to search around
245 radius - radius around origin to search
246function EntitiesByOrder() - Generator function that returns entities ordered by ent index
247 returns: entity ent
248*/
249
250
251if("HookController_Loaded" in this){
252 return
253}
254
255Keys <- {
256 ATTACK = 1
257 JUMP = 2
258 DUCK = 4
259 FORWARD = 8
260 BACKWARD = 16
261 USE = 32
262 CANCEL = 64
263 LEFT = 128
264 RIGHT = 256
265 MOVELEFT = 512
266 MOVERIGHT = 1024
267 ATTACK2 = 2048
268 RUN = 4096
269 RELOAD = 8192
270 ALT1 = 16384
271 ALT2 = 32768
272 SHOWSCORES = 65536
273 SPEED = 131072
274 WALK = 262144
275 ZOOM = 524288
276 WEAPON1 = 1048576
277 WEAPON2 = 2097152
278 BULLRUSH = 4194304
279 GRENADE1 = 8388608
280 GRENADE2 = 16777216
281 LOOKSPIN = 33554432
282}
283
284VariableTypes <- {
285 INTEGER = "integer"
286 FLOAT = "float"
287 BOOLEAN = "bool"
288 STRING = "string"
289 TABLE = "table"
290 ARRAY = "array"
291 FUNCTION = "function"
292 CLASS = "class"
293 INSTANCE = "instance"
294 THREAD = "thread"
295 NULL = "null"
296}
297
298Characters <- {
299 SPACE = " "
300 NEWLINE = "\n"
301 TAB = "\t"
302 RETURN = "\r"
303}
304
305Flags <- {
306 ONGROUND = 1 // At rest / on the ground
307 DUCKING = 2 // Player flag -- Player is fully crouched
308 WATERJUMP = 4 // player jumping out of water
309 ONTRAIN = 8 // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
310 INRAIN = 16 // Indicates the entity is standing in rain
311 FROZEN = 32 // Player is frozen for 3rd person camera
312 ATCONTROLS = 64 // Player can't move, but keeps key inputs for controlling another entity
313 CLIENT = 128 // Is a player
314 FAKECLIENT = 256 // Fake client, simulated server side; don't send network messages to them
315 INWATER = 512
316 FLY = 1024 // Changes the SV_Movestep() behavior to not need to be on ground
317 SWIM = 2048 // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
318 CONVEYOR = 4096
319 NPC = 8192
320 GODMODE = 16384
321 NOTARGET = 32768
322 AIMTARGET = 65536 // set if the crosshair needs to aim onto the entity
323 PARTIALGROUND = 131072 // not all corners are valid
324 STATICPROP = 262144
325 GRAPHED = 524288 // worldgraph has this ent listed as something that blocks a connection
326 GRENADE = 1048576
327 STEPMOVEMENT = 2097152 // Changes the SV_Movestep() behavior to not do any processing
328 DONTTOUCH = 4194304 // Doesn't generate touch functions, generates Untouch() for anything it was touching when this flag was set
329 BASEVELOCITY = 8388608 // Base velocity has been applied this frame (used to convert base velocity into momentum)
330 WORLDBRUSH = 16777216 // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
331 OBJECT = 33554432 // Terrible name. This is an object that NPCs should see. Missiles, for example.
332 KILLME = 67108864 // This entity is marked for death -- will be freed by game DLL
333 ONFIRE = 134217728
334 DISSOLVING = 268435456
335 TRANSRAGDOLL = 536870912 // In the process of turning into a client side ragdoll.
336 UNBLOCKABLE_BY_PLAYER = 1073741824 // pusher that can't be blocked by the player
337 FREEZING = 2147483648
338}
339
340RenderFX <- {
341 NONE = 0
342 PULSE_SLOW = 1
343 PULSE_FAST = 2
344 PULSE_SLOW_WIDE = 3
345 PULSE_FAST_WIDE = 4
346 FADE_SLOW = 5
347 FADE_FAST = 6
348 SOLID_SLOW = 7
349 SOLID_FAST = 8
350 STROBE_SLOW = 9
351 STROBE_FAST = 10
352 STROBE_FASTER = 11
353 FLICKER_SLOW = 12
354 FLICKER_FAST = 13
355 NO_DISSIPATION = 14
356 DISTORT = 15
357 HOLOGRAM = 16
358 EXPLODE = 17
359 GLOWSHELL = 18
360 CLAMP_MIN_SCALE = 19
361 ENV_RAIN = 20
362 ENV_SNOW = 21
363 SPOTLIGHT = 22
364 RAGDOLL = 23
365 PULSE_FAST_WIDER = 24
366}
367
368EntityEffects <- {
369 BONEMERGE = 1
370 BRIGHT_LIGHT = 2
371 DIM_LIGHT = 4
372 NO_INTERP = 8
373 NO_SHADOW = 16
374 NO_DRAW = 32
375 NO_RECEIVE_SHADOW = 64
376 BONEMERGE_FASTCULL = 128
377 ITEM_BLINK = 256
378 PARENT_ANIMATES = 512
379}
380
381RenderModes <- {
382 NORMAL = 0
383 TRANS_COLOR = 1
384 TRANS_TEXTURE = 2
385 GLOW = 3
386 TRANS_ALPHA = 4
387 TRANS_ADD = 5
388 ENVIRONMENTAL = 6
389 TRANS_ADD_FRAME_BLEND = 7
390 TRANS_ALPHA_ADD = 8
391 WORLD_GLOW = 9
392 NONE = 10
393}
394
395MoveTypes <- {
396 NONE = 0
397 ISOMETRIC = 1
398 WALK = 2
399 STEP = 3
400 FLY = 4
401 FLYGRAVITY = 5
402 VPHYSICS = 6
403 PUSH = 7
404 NOCLIP = 8
405 LADDER = 9
406 OBSERVER = 10
407 CUSTOM = 11
408}
409
410DamageTypes <- {
411 GENERIC = 0
412 CRUSH = 1
413 BULLET = 2
414 SLASH = 4
415 BURN = 8
416 VEHICLE = 16
417 FALL = 32
418 BLAST = 64
419 CLUB = 128
420 SHOCK = 256
421 SONIC = 512
422 ENERGYBEAM = 1024
423 PREVENT_PHYSICS_FORCE = 2048
424 NEVERGIB = 4096
425 ALWAYSGIB = 8192
426 DROWN = 16384
427 PARALYZE = 32768
428 NERVEGAS = 65536
429 POISON = 131072
430 RADIATION = 262144
431 DROWNRECOVER = 524288
432 ACID = 1048576
433 MELEE = 2097152
434 REMOVENORAGDOLL = 4194304
435 PHYSGUN = 8388608
436 PLASMA = 16777216
437 STUMBLE = 33554432
438 DISSOLVE = 67108864
439 BLAST_SURFACE = 134217728
440 DIRECT = 268435456
441 BUCKSHOT = 536870912
442 HEADSHOT = 1073741824
443}
444
445SolidTypes <- {
446 NONE = 0
447 BSP = 1
448 BBOX = 2
449 OBB = 3
450 OBB_YAW = 4
451 CUSTOM = 5
452 VPHYSICS = 6
453}
454
455SolidFlags <- {
456 CUSTOMRAYTEST = 1
457 CUSTOMBOXTEST = 2
458 NOT_SOLID = 4
459 TRIGGER = 8
460 NOT_STANDABLE = 16
461 VOLUME_CONTENTS = 32
462 FORCE_WORLD_ALIGNED = 64
463 USE_TRIGGER_BOUNDS = 128
464 ROOT_PARENT_ALIGNED = 256
465 TRIGGER_TOUCH_DEBRIS = 512
466}
467
468MoveCollide <- {
469 DEFAULT = 0
470 FLY_BOUNCE = 1
471 FLY_CUSTOM = 2
472 FLY_SLIDE = 3
473}
474
475CollisionGroups <- {
476 NONE = 0
477 DEBRIS = 1
478 DEBRIS_TRIGGER = 2
479 INTERACTIVE_DEBRIS = 3
480 INTERACTIVE = 4
481 PLAYER = 5
482 BREAKABLE_GLASS = 6
483 VEHICLE = 7
484 PLAYER_MOVEMENT = 8
485 NPC = 9
486 IN_VEHICLE = 10
487 WEAPON = 11
488 VEHICLE_CLIP = 12
489 PROJECTILE = 13
490 DOOR_BLOCKER = 14
491 PASSABLE_DOOR = 15
492 DISSOLVING = 16
493 PUSHAWAY = 17
494 NPC_ACTOR = 18
495 NPC_SCRIPTED = 19
496}
497
498TraceContent <- {
499 EMPTY = 0
500 SOLID = 1
501 WINDOW = 2
502 AUX = 4
503 GRATE = 8
504 SLIME = 16
505 WATER = 32
506 MIST = 64
507 OPAQUE = 128
508 TESTFOGVOLUME = 256
509 UNUSED5 = 512
510 UNUSED6 = 1024
511 TEAM1 = 2048
512 TEAM2 = 4096
513 IGNORE_NODRAW_OPAQUE = 8192
514 MOVEABLE = 16384
515 AREAPORTAL = 32768
516 PLAYERCLIP = 65536
517 MONSTERCLIP = 131072
518 CURRENT_0 = 262144
519 CURRENT_90 = 524288
520 CURRENT_180 = 1048576
521 CURRENT_270 = 2097152
522 CURRENT_UP = 4194304
523 CURRENT_DOWN = 8388608
524 ORIGIN = 16777216
525 MONSTER = 33554432
526 DEBRIS = 67108864
527 DETAIL = 134217728
528 TRANSLUCENT = 268435456
529 LADDER = 536870912
530 HITBOX = 1073741824
531}
532
533TraceMasks <- {
534 ALL = -1
535 SOLID = 33570827
536 PLAYERSOLID = 33636363
537 NPCSOLID = 33701899
538 WATER = 16432
539 OPAQUE = 16513
540 OPAQUE_AND_NPCS = 33570945
541 VISIBLE = 24705
542 VISIBLE_AND_NPCS = 33579137
543 SHOT = 1174421507
544 SHOT_HULL = 100679691
545 SHOT_PORTAL = 16387
546 SOLID_BRUSHONLY = 16395
547 PLAYERSOLID_BRUSHONLY = 81931
548 NPCSOLID_BRUSHONLY = 147467
549 NPCWORLDSTATIC = 131083
550 SPLITAREAPORTAL = 48
551}
552
553BotCommands <- {
554 ATTACK = 0
555 MOVE = 1
556 RETREAT = 2
557 RESET = 3
558}
559
560BotSense <- {
561 CANT_SEE = 1
562 CANT_HEAR = 2
563 CANT_FEEL = 4
564}
565
566HUDPositions <- {
567 LEFT_TOP = 0
568 LEFT_BOT = 1
569 MID_TOP = 2
570 MID_BOT = 3
571 RIGHT_TOP = 4
572 RIGHT_BOT = 5
573 TICKER = 6
574 FAR_LEFT = 7
575 FAR_RIGHT = 8
576 MID_BOX = 9
577 SCORE_TITLE = 10
578 SCORE_1 = 11
579 SCORE_2 = 12
580 SCORE_3 = 13
581 SCORE_4 = 14
582}
583
584HUDFlags <- {
585 PRESTR = 1
586 POSTSTR = 2
587 BEEP = 4
588 BLINK = 8
589 AS_TIME = 16
590 COUNTDOWN_WARN = 32
591 NOBG = 64
592 ALLOWNEGTIMER = 128
593 ALIGN_LEFT = 256
594 ALIGN_CENTER = 512
595 ALIGN_RIGHT = 768
596 TEAM_SURVIVORS = 1024
597 TEAM_INFECTED = 2048
598 TEAM_MASK = 3072
599 NOTVISIBLE = 16384
600}
601
602ZombieTypes <- {
603 SMOKER = 1
604 BOOMER = 2
605 HUNTER = 3
606 SPITTER = 4
607 JOCKEY = 5
608 CHARGER = 6
609 WITCH = 7
610 TANK = 8
611 SURVIVOR = 9
612 MOB = 10
613 WITCHBRIDE = 11
614 MUDMEN = 12
615}
616
617
618const PRINT_START = "Hook Controller: "
619
620class PlayerInfo {
621 entity = null
622 disabled = false
623 disabledLast = false
624 heldButtonsMask = 0
625
626 lastWeapon = null
627 lastWeapons = []
628
629 constructor(ent){
630 entity = ent
631 }
632
633 function SetDisabled(isDisabled){
634 disabledLast = disabled
635 disabled = isDisabled
636 }
637
638 function IsDisabled(){
639 return disabled
640 }
641
642 function WasDisabled(){
643 return disabledLast
644 }
645
646
647 function GetEntity(){
648 return entity
649 }
650
651
652 function GetHeldButtonsMask(){
653 return heldButtonsMask
654 }
655
656 function SetHeldButtonsMask(mask){
657 heldButtonsMask = mask
658 }
659
660
661 function GetLastWeapon(){
662 return lastWeapon
663 }
664
665
666 function SetLastWeapon(ent){
667 lastWeapon = ent
668 }
669
670 function GetLastWeaponsArray(){
671 return lastWeapons
672 }
673 function SetLastWeaponsArray(array){
674 lastWeapons = array
675 }
676}
677
678class CustomWeapon {
679 viewmodel = null
680 worldmodel = null
681 scope = null
682
683 constructor(vmodel, wmodel, scriptscope){
684 viewmodel = vmodel
685 worldmodel = wmodel
686 scope = scriptscope
687 }
688
689 function GetViewmodel(){
690 return viewmodel
691 }
692
693 function GetWorldModel(){
694 return worldmodel
695 }
696
697 function GetScope(){
698 return scope
699 }
700}
701
702class EntityCreateListener {
703 oldEntities = []
704 scope = null
705 classname = null
706
707 constructor(className, scriptscope){
708 classname = className
709 scope = scriptscope
710 }
711
712 function GetClassname(){
713 return classname
714 }
715
716 function GetScope(){
717 return scope
718 }
719
720 function GetOldEntities(){
721 return oldEntities
722 }
723 function SetOldEntities(array){
724 oldEntities = array
725 }
726}
727
728class EntityMoveListener {
729 lastPosition = null
730 entity = null
731 scope = null
732
733 constructor(ent, scriptScope){
734 entity = ent
735 scope = scriptScope
736 lastPosition = entity.GetOrigin()
737 }
738
739 function GetScope(){
740 return scope
741 }
742
743 function GetEntity(){
744 return entity
745 }
746
747 function GetLastPosition(){
748 return lastPosition
749 }
750
751 function SetLastPosition(position){
752 lastPosition = position
753 }
754}
755
756class ThrowableExplodeListener {
757 scope = null
758
759 constructor(scope){
760 this.scope = scope
761 }
762
763 function GetScope(){
764 return scope
765 }
766}
767
768class Task {
769 functionKey = null
770 args = null
771 endTime = null
772
773 /*
774 We place the function in a table with the arguments so that the function can access the arguments
775 */
776 constructor(func, arguments, time){
777 functionKey = UniqueString("TaskFunction")
778 args = arguments
779 args[functionKey] <- func
780 endTime = time
781 }
782
783 function CallFunction(){
784 args[functionKey]()
785 }
786
787 function ReachedTime(){
788 return Time() >= endTime
789 }
790}
791
792class Timer {
793 constructor(hudField, time, callFunction, countDown, formatTime){
794 this.hudField = hudField
795 this.time = time
796 this.callFunction = callFunction
797 this.countDown = countDown
798 this.formatTime = formatTime
799
800 start = Time()
801 }
802
803 function FormatTime(time){
804 local seconds = ceil(time) % 60
805 local minutes = floor(ceil(time) / 60)
806 if(seconds < 10){
807 return minutes.tointeger() + ":0" + seconds.tointeger()
808 } else {
809 return minutes.tointeger() + ":" + seconds.tointeger()
810 }
811 }
812
813 function Update(){
814 local timeRemaining = -1
815
816 if(countDown){
817 timeRemaining = time - (Time() - start)
818 } else {
819 timeRemaining = Time() - start
820 }
821
822 if(formatTime){
823 hudField.dataval = FormatTime(timeRemaining)
824 } else {
825 if(countDown){
826 timeRemaining = ceil(timeRemaining).tointeger()
827 } else {
828 timeRemaining = floor(timeRemaining).tointeger()
829 }
830 hudField.dataval = timeRemaining
831 }
832
833 return (countDown && timeRemaining <= 0) || (!countDown && timeRemaining >= time)
834 }
835
836 function CallFunction(){
837 callFunction()
838 }
839
840 function GetHudField(){
841 return hudField
842 }
843
844 hudField = null
845 start = -1
846 time = -1
847 callFunction = null
848 countDown = true
849 formatTime = false
850}
851
852class ChatCommand {
853 inputCommand = false
854 commandString = null
855 commandFunction = null
856
857 constructor(command, func, isInput){
858 commandString = command
859 commandFunction = func
860 inputCommand = isInput
861 }
862
863 function CallFunction(ent, input = null){
864 if(inputCommand){
865 commandFunction(ent, input)
866 } else {
867 commandFunction(ent)
868 }
869 }
870
871 function GetCommand(){
872 return commandString
873 }
874
875 function IsInputCommand(){
876 return inputCommand
877 }
878}
879
880class ConvarListener {
881 convar = null
882 type = null
883 lastValue = null
884 scope = null
885
886 /*
887 type should be either "string" or "float"
888 */
889 constructor(convar, type, scope){
890 this.convar = convar
891 this.type = type
892 this.scope = scope
893 }
894
895 function GetScope(){
896 return scope
897 }
898
899 function GetConvar(){
900 return convar
901 }
902
903 function GetCurrentValue(){
904 if(type.tolower() == "string"){
905 return Convars.GetStr(convar)
906 } else if(type.tolower() == "float"){
907 return Convars.GetFloat(convar)
908 }
909 }
910
911 function GetLastValue(){
912 return lastValue
913 }
914
915 function SetLastValue(){
916 if(type == "string"){
917 lastValue = Convars.GetStr(convar)
918 } else if(type == "float"){
919 lastValue = Convars.GetFloat(convar)
920 }
921 }
922}
923
924class FunctionListener {
925 checkFunctionTable = null
926 checkFunctionKey = null
927 callFunction = null
928 singleUse = false
929
930 constructor(checkFunction, callFunction, args, singleUse){
931 checkFunctionTable = args
932 checkFunctionKey = UniqueString()
933 checkFunctionTable[checkFunctionKey] <- checkFunction
934 this.callFunction = callFunction
935 this.singleUse = singleUse
936 }
937
938 function CheckValue(){
939 if(checkFunctionTable[checkFunctionKey]()){
940 callFunction()
941 return true
942 }
943 return false
944 }
945
946 function IsSingleUse(){
947 return singleUse
948 }
949}
950
951class LockedEntity {
952 entity = null
953 angles = null
954 origin = null
955
956 constructor(entity, angles, origin){
957 this.entity = entity
958 this.angles = angles
959 this.origin = origin
960 }
961
962 function DoLock(){
963 entity.SetAngles(angles)
964 entity.SetOrigin(origin)
965 }
966}
967
968class ThrownGrenade {
969 entity = null
970 thrower = null
971 startPosition = null
972 lastPosition = null
973 lastVelocity = null
974
975 constructor(entity, thrower, startPosition, lastPosition, lastVelocity){
976 this.entity = entity
977 this.thrower = thrower
978 this.startPosition = startPosition
979 this.lastPosition = lastPosition
980 this.lastVelocity = lastVelocity
981 }
982
983 function CheckRemoved(){
984 return entity == null || !entity.IsValid()
985 }
986
987 function GetStartPosition(){
988 return startPosition
989 }
990
991 function SetLastPosition(){
992 this.lastPosition = entity.GetOrigin()
993 }
994
995 function GetLastPosition(){
996 return lastPosition
997 }
998
999 function SetLastVelocity(){
1000 this.lastVelocity = entity.GetVelocity()
1001 }
1002
1003 function GetLastVelocity(){
1004 return lastVelocity
1005 }
1006
1007 function GetThrower(){
1008 return thrower
1009 }
1010
1011 function GetEntity(){
1012 return entity
1013 }
1014}
1015
1016// options
1017local debugPrint = true
1018
1019local customWeapons = []
1020local hookScripts = []
1021local tickScripts = []
1022local tickFunctions = []
1023local entityMoveListeners = []
1024local entityCreateListeners = []
1025local bileExplodeListeners = []
1026local molotovExplodeListeners = []
1027local convarListeners = []
1028local functionListeners = []
1029local chatCommands = []
1030local timers = []
1031local tasks = []
1032local lockedEntities = []
1033
1034local bileJars = []
1035local molotovs = []
1036
1037local players = []
1038
1039local timescaleEnt = SpawnEntityFromTable("func_timescale", {})
1040
1041local improvedMethods = false
1042
1043
1044// This initializes the timer responsible for the calls to the Think function
1045local timer = SpawnEntityFromTable("logic_timer",{RefireTime = 0.01})
1046timer.ValidateScriptScope()
1047timer.GetScriptScope()["scope"] <- this
1048timer.GetScriptScope()["func"] <- function(){
1049 scope.Think()
1050}
1051timer.ConnectOutput("OnTimer", "func")
1052EntFire("!self","Enable",null,0,timer)
1053
1054HookController_Loaded <- true
1055
1056/**
1057 * Prints a message to the console with PRINT_START prepended
1058 */
1059local function PrintInfo(message){
1060 if(debugPrint){
1061 printl(PRINT_START + message)
1062 }
1063}
1064
1065/**
1066 * Prints an error to the console with PRINT_START prepended
1067 */
1068local function PrintError(message){
1069 print("\n" + PRINT_START)
1070 error(message + "\n\n")
1071}
1072
1073/**
1074 * Prints an error to the console including caller, source file, variable type, and expected type with PRINT_START prepended
1075 */
1076local function PrintInvalidVarType(message, parameterName, expectedType, actualType, stackLevel = 3){
1077 local infos = getstackinfos(stackLevel)
1078
1079 if(typeof(expectedType) == VariableTypes.ARRAY){
1080 local newExpectedType = ""
1081 for(local i = 0; i < expectedType.len(); i++){
1082 if(i < expectedType.len() - 1){
1083 newExpectedType += expectedType[i] + " OR "
1084 } else {
1085 newExpectedType += expectedType[i]
1086 }
1087 }
1088 expectedType = newExpectedType
1089 }
1090 PrintError(message + "\n\n\tParameter \"" + parameterName + "\" has an invalid type '" + actualType + "' ; expected: '" + expectedType + "'\n\n\tCALL\n\t\tFUNCTION: " + infos.func + "\n\t\tSOURCE: " + infos.src + "\n\t\tLINE: " + infos.line)
1091}
1092
1093
1094/**
1095 * Checks the type of var, returns true if type matches, false otherwise
1096 */
1097local function CheckType(var, type, message = null, parameterName = null){
1098 if(message != null && parameterName != null && typeof(type) != VariableTypes.ARRAY && typeof(var) != type){
1099 PrintInvalidVarType(message, parameterName, type, typeof(var), 4)
1100 return false
1101 }
1102
1103 if(typeof(type) == VariableTypes.ARRAY){
1104 local foundCorrectType = false
1105 foreach(typeElement in type){
1106 if(typeof(var) == typeElement){
1107 foundCorrectType = true
1108 break
1109 }
1110 }
1111 if(!foundCorrectType){
1112 PrintInvalidVarType(message, parameterName, type, typeof(var), 4)
1113 return false
1114 } else {
1115 return true
1116 }
1117 }
1118 return typeof(var) == type
1119}
1120
1121/**
1122 * Returns an array of all survivors, dead or alive
1123 */
1124local function GetSurvivors(){
1125 local array = []
1126 local ent = null
1127 while (ent = Entities.FindByClassname(ent, "player")){
1128 if(ent.IsValid() && ent.IsSurvivor()){
1129 array.append(ent)
1130 }
1131 }
1132
1133 return array
1134}
1135
1136/**
1137 * Returns the PlayerInfo instance corresponding to the given entity if it exists, otherwise returns null
1138 */
1139local function FindPlayerObject(entity){
1140 foreach(player in players){
1141 if(player.GetEntity() == entity){
1142 return player
1143 }
1144 }
1145}
1146
1147/**
1148 * Returns the CustomWeapon instance corresponding to the given viewmodel if it exists, otherwise returns null
1149 */
1150local function FindCustomWeapon(viewmodel){
1151 foreach(weapon in customWeapons){
1152 if(weapon.GetViewmodel().tolower() == viewmodel.tolower()){
1153 return weapon
1154 }
1155 }
1156}
1157
1158/**
1159 * Calls a specified function by name in the provided scope with optional parameters
1160 * If the function has entity or ent, it will pass the ent parameter to it
1161 * If the function has player, it will pass the player parameter to it
1162 */
1163local function CallFunction(scope, funcName, ent = -1, player = -1){ // if parameters has entity (or ent), pass ent, if has player, pass player
1164 if(scope != null && funcName in scope && typeof(scope[funcName]) == "function"){
1165 /*local params = scope[funcName].getinfos().parameters
1166 local index_offset = 0 // sometimes it contains "this" sometimes it doesn't?
1167 if(params.find("this") != null){
1168 index_offset = -1
1169 }
1170 if(params.find("player") != null){
1171 if(params.find("ent") != null){
1172 if(params.find("ent") + index_offset == 0){
1173 scope[funcName](ent, player)
1174 } else {
1175 scope[funcName](player, ent)
1176 }
1177 } else if(params.find("entity") != null) {
1178 if(params.find("entity") + index_offset == 0){
1179 scope[funcName](ent, player)
1180 } else {
1181 scope[funcName](player, ent)
1182 }
1183 } else {
1184 scope[funcName](player)
1185 }
1186 } else if(params.find("ent") != null || params.find("entity") != null){
1187 scope[funcName](ent)
1188 } else {
1189 scope[funcName]()
1190 }*/
1191 if(ent == -1 && player == -1){
1192 scope[funcName]()
1193 } else if(ent == -1){
1194 scope[funcName](player)
1195 } else if(player == -1){
1196 scope[funcName](ent)
1197 } else {
1198 scope[funcName](player, ent)
1199 }
1200 }
1201}
1202
1203/**
1204 * Calls the OnInventoryChange function in the specified scope with the ent, droppedWeapons, and newWeapons parameters
1205 */
1206local function CallInventoryChangeFunction(scope, ent, droppedWeapons, newWeapons){
1207 if(scope != null && "OnInventoryChange" in scope && CheckType(scope["OnInventoryChange"], VariableTypes.FUNCTION)){
1208 scope["OnInventoryChange"](ent, droppedWeapons, newWeapons)
1209 }
1210}
1211
1212/**
1213 * Calls the OnKeyPressStart_, OnKeyPressTick_, and OnKeyPressEnd_ for the specified keyName within the specified scope
1214 */
1215local function CallKeyPressFunctions(player, scope, keyId, keyName){
1216 if(player.GetEntity().GetButtonMask() & keyId){
1217 if(player.GetHeldButtonsMask() & keyId){
1218 foreach(script in hookScripts){
1219 CallFunction(script, "OnKeyPressTick_" + keyName, player.GetEntity().GetActiveWeapon(), player.GetEntity())
1220 }
1221 CallFunction(scope, "OnKeyPressTick_" + keyName, player.GetEntity().GetActiveWeapon(), player.GetEntity())
1222 } else {
1223 player.SetHeldButtonsMask(player.GetHeldButtonsMask() | keyId)
1224 foreach(script in hookScripts){
1225 CallFunction(script, "OnKeyPressStart_" + keyName, player.GetEntity().GetActiveWeapon(), player.GetEntity())
1226 }
1227 CallFunction(scope, "OnKeyPressStart_" + keyName, player.GetEntity().GetActiveWeapon(), player.GetEntity())
1228 }
1229 } else if(player.GetHeldButtonsMask() & keyId){
1230 player.SetHeldButtonsMask(player.GetHeldButtonsMask() & ~keyId)
1231 foreach(script in hookScripts){
1232 CallFunction(script, "OnKeyPressEnd_" + keyName, player.GetEntity().GetActiveWeapon(), player.GetEntity())
1233 }
1234 CallFunction(scope, "OnKeyPressEnd_" + keyName, player.GetEntity().GetActiveWeapon(), player.GetEntity())
1235 }
1236}
1237
1238/**
1239 * Calls OnEquipped or OnUnequipped in the custom weapon scope specified by the weaponModel parameter
1240 */
1241local function CallWeaponEquipFunctions(player, weaponModel){
1242 if(player.GetLastWeapon() != null && NetProps.GetPropString(player.GetLastWeapon(), "m_ModelName") != weaponModel){ //we changed weapons!
1243 foreach(weapon in customWeapons){
1244 if(NetProps.GetPropString(player.GetLastWeapon(), "m_ModelName") == weapon.GetViewmodel()){
1245 CallFunction(weapon.GetScope(),"OnUnequipped",player.GetLastWeapon(),player.GetEntity())
1246 } else if(weaponModel == weapon.GetViewmodel()){
1247 CallFunction(weapon.GetScope(),"OnEquipped",player.GetLastWeapon(),player.GetEntity())
1248 }
1249 }
1250 }
1251}
1252
1253/**
1254 * Calls OnConvarChange_ in the specified scope with previousValue and newValue
1255 */
1256local function CallConvarChangeFunction(scope, convar, previousValue, newValue){
1257 local funcName = "OnConvarChange_" + convar
1258 if(scope != null && funcName in scope && CheckType(scope[funcName], VariableTypes.FUNCTION)){
1259 scope[funcName](previousValue, newValue)
1260 }
1261}
1262
1263
1264/**
1265 * Called every tick, handles tasks, hooks, etc
1266 */
1267function Think(){
1268 if((improvedMethods && Time() > 0.034) || !improvedMethods){
1269 foreach(survivor in GetSurvivors()){
1270 if(players.len() == 0){
1271 players.append(PlayerInfo(survivor))
1272 } else {
1273 local found = false
1274 for(local i=0; i<players.len();i++){
1275 local player = players[i]
1276 if(player.GetEntity() != null && player.GetEntity().IsValid()){
1277 if(survivor.GetPlayerUserId() == player.GetEntity().GetPlayerUserId()){
1278 found = true
1279 }
1280
1281 if((NetProps.GetPropEntity(survivor, "m_tongueOwner") && (NetProps.GetPropInt(survivor, "m_isHangingFromTongue") || NetProps.GetPropInt(survivor, "m_reachedTongueOwner") || Time() >= NetProps.GetPropFloat(survivor, "m_tongueVictimTimer") + 1)) || NetProps.GetPropEntity(survivor, "m_jockeyAttacker") || NetProps.GetPropEntity(survivor, "m_pounceAttacker") || (NetProps.GetPropEntity(survivor, "m_pummelAttacker") || NetProps.GetPropEntity(survivor, "m_carryAttacker"))){
1282 player.SetDisabled(true)
1283 } else {
1284 player.SetDisabled(false)
1285 }
1286
1287 if(player.WasDisabled() && !player.IsDisabled()){
1288 foreach(weapon in customWeapons){
1289 CallFunction(weapon.GetScope(), "OnReleased", player.GetEntity().GetActiveWeapon(), player.GetEntity())
1290 }
1291 }
1292 if(!player.WasDisabled() && player.IsDisabled()){
1293 foreach(weapon in customWeapons){
1294 CallFunction(weapon.GetScope(), "OnRestricted", player.GetEntity().GetActiveWeapon(), player.GetEntity())
1295 }
1296 }
1297 } else {
1298 players.remove(i)
1299 i -= 1
1300 }
1301 }
1302 if(!found){
1303 players.append(PlayerInfo(survivor))
1304 }
1305 }
1306 }
1307 foreach(script in hookScripts){
1308 CallFunction(script, "OnTick")
1309 foreach(player in players){
1310 CallKeyPressFunctions(player, script, Keys.ATTACK, "Attack")
1311 CallKeyPressFunctions(player, script, Keys.JUMP, "Jump")
1312 CallKeyPressFunctions(player, script, Keys.DUCK, "Crouch")
1313 CallKeyPressFunctions(player, script, Keys.FORWARD, "Forward")
1314 CallKeyPressFunctions(player, script, Keys.BACKWARD, "Backward")
1315 CallKeyPressFunctions(player, script, Keys.USE, "Use")
1316 CallKeyPressFunctions(player, script, Keys.CANCEL, "Cancel")
1317 CallKeyPressFunctions(player, script, Keys.LEFT, "Left")
1318 CallKeyPressFunctions(player, script, Keys.RIGHT, "Right")
1319 CallKeyPressFunctions(player, script, Keys.MOVELEFT, "MoveLeft")
1320 CallKeyPressFunctions(player, script, Keys.MOVERIGHT, "MoveRight")
1321 CallKeyPressFunctions(player, script, Keys.ATTACK2, "Attack2")
1322 CallKeyPressFunctions(player, script, Keys.RUN, "Run")
1323 CallKeyPressFunctions(player, script, Keys.RELOAD, "Reload")
1324 CallKeyPressFunctions(player, script, Keys.ALT1, "Alt1")
1325 CallKeyPressFunctions(player, script, Keys.ALT2, "Alt2")
1326 CallKeyPressFunctions(player, script, Keys.SHOWSCORES, "Showscores")
1327 CallKeyPressFunctions(player, script, Keys.SPEED, "Speed")
1328 CallKeyPressFunctions(player, script, Keys.WALK, "Walk")
1329 CallKeyPressFunctions(player, script, Keys.ZOOM, "Zoom")
1330 CallKeyPressFunctions(player, script, Keys.WEAPON1, "Weapon1")
1331 CallKeyPressFunctions(player, script, Keys.WEAPON2, "Weapon2")
1332 CallKeyPressFunctions(player, script, Keys.BULLRUSH, "Bullrush")
1333 CallKeyPressFunctions(player, script, Keys.GRENADE1, "Grenade1")
1334 CallKeyPressFunctions(player, script, Keys.GRENADE2, "Grenade2")
1335 CallKeyPressFunctions(player, script, Keys.LOOKSPIN, "Lookspin")
1336 }
1337 }
1338 foreach(script in tickScripts){
1339 CallFunction(script, "OnTick")
1340 }
1341 foreach(func in tickFunctions){
1342 func()
1343 }
1344 foreach(weapon in customWeapons){
1345 CallFunction(weapon.GetScope(), "OnTick")
1346 }
1347
1348 if(bileExplodeListeners.len() > 0){
1349 for(local i = 0; i < bileJars.len(); i++){
1350 local bileJar = bileJars[i]
1351 if(bileJar.CheckRemoved()){
1352 foreach(listener in bileExplodeListeners){
1353 if("OnBileExplode" in listener.GetScope() && CheckType(listener.GetScope()["OnBileExplode"], VariableTypes.FUNCTION)){
1354 listener.GetScope()["OnBileExplode"](bileJar.GetThrower(), bileJar.GetStartPosition(), bileJar.GetLastPosition())
1355 }
1356 }
1357 bileJars.remove(i)
1358 i--
1359 } else {
1360 bileJar.SetLastPosition()
1361 bileJar.SetLastVelocity()
1362 }
1363 }
1364
1365 local newBileJar = null
1366 while(newBileJar = Entities.FindByClassname(newBileJar, "vomitjar_projectile")){
1367 local foundInstance = false
1368 foreach(bileJar in bileJars){
1369 if(bileJar.GetEntity() == newBileJar){
1370 foundInstance = true
1371 }
1372 }
1373 if(!foundInstance){
1374 bileJars.append(ThrownGrenade(newBileJar, NetProps.GetPropEntity(newBileJar, "m_hThrower"), newBileJar.GetOrigin(), newBileJar.GetOrigin(), newBileJar.GetVelocity()))
1375 }
1376 }
1377 }
1378
1379 if(molotovExplodeListeners.len() > 0){
1380 for(local i = 0; i < molotovs.len(); i++){
1381 local molotov = molotovs[i]
1382 if(molotov.CheckRemoved()){
1383 foreach(listener in molotovExplodeListeners){
1384 if("OnMolotovExplode" in listener.GetScope() && CheckType(listener.GetScope()["OnMolotovExplode"], VariableTypes.FUNCTION)){
1385 listener.GetScope()["OnMolotovExplode"](molotov.GetThrower(), molotov.GetStartPosition(), molotov.GetLastPosition())
1386 }
1387 }
1388 molotovs.remove(i)
1389 i--
1390 } else {
1391 molotov.SetLastPosition()
1392 molotov.SetLastVelocity()
1393 }
1394 }
1395
1396 local newMolotov = null
1397 while(newMolotov = Entities.FindByClassname(newMolotov, "molotov_projectile")){
1398 local foundInstance = false
1399 foreach(molotov in molotovs){
1400 if(molotov.GetEntity() == newMolotov){
1401 foundInstance = true
1402 }
1403 }
1404 if(!foundInstance){
1405 molotovs.append(ThrownGrenade(newMolotov, NetProps.GetPropEntity(newMolotov, "m_hThrower"), newMolotov.GetOrigin(), newMolotov.GetOrigin(), newMolotov.GetVelocity()))
1406 }
1407 }
1408 }
1409
1410 for(local i=0; i < timers.len(); i++){
1411 if(timers[i].Update()){
1412 local timer = timers[i]
1413 timer.CallFunction()
1414 for(local j = 0; j < timers.len(); j++){
1415 if(timer.GetHudField() == timers[i].GetHudField()){
1416 timers.remove(j)
1417 i--
1418 break
1419 }
1420 }
1421 }
1422 }
1423
1424 for(local i=0; i < functionListeners.len(); i+=1){
1425 if(functionListeners[i].CheckValue() && functionListeners[i].IsSingleUse()){
1426 functionListeners.remove(i)
1427 i -= 1
1428 }
1429 }
1430
1431 foreach(lockedEntity in lockedEntities){
1432 lockedEntity.DoLock()
1433 }
1434
1435 foreach(listener in entityMoveListeners){
1436 local currentPosition = listener.GetEntity().GetOrigin()
1437 local oldPosition = listener.GetLastPosition()
1438 if(oldPosition != null && currentPosition != oldPosition){
1439 CallFunction(listener.GetScope(),"OnEntityMove",listener.GetEntity())
1440 }
1441 listener.SetLastPosition(listener.GetEntity().GetOrigin())
1442 }
1443
1444 foreach(listener in entityCreateListeners){
1445 local ent = null
1446 local entityArray = []
1447 while((ent = Entities.FindByClassname(ent,listener.GetClassname())) != null){
1448 entityArray.append(ent)
1449 }
1450 if(listener.GetOldEntities() != null && listener.GetOldEntities().len() < entityArray.len()){ // this may miss entities if an entity of the same type is killed at the same time as one is spawned
1451 entityArray.sort(@(a, b) a.GetEntityIndex() <=> b.GetEntityIndex())
1452 local newEntities = entityArray.slice(listener.GetOldEntities().len())
1453 foreach(newEntity in newEntities){
1454 CallFunction(listener.GetScope(), "OnEntCreate_" + listener.GetClassname(), newEntity)
1455 }
1456 }
1457 listener.SetOldEntities(entityArray)
1458 }
1459
1460 foreach(listener in convarListeners){
1461 if(listener.GetCurrentValue() != listener.GetLastValue){
1462 CallConvarChangeFunction(listener.GetScope(), listener.GetConvar(), listener.GetLastValue(), listener.GetCurrentValue())
1463 }
1464
1465 listener.SetLastValue()
1466 }
1467
1468 if(customWeapons.len() > 0 || hookScripts.len() > 0){
1469 foreach(player in players){
1470 if(player.GetEntity() == null || !player.GetEntity().IsValid() || player.GetEntity().IsDead()){
1471 player.SetDisabled(true)
1472 } else {
1473 local weaponModel = NetProps.GetPropString(player.GetEntity().GetActiveWeapon(), "m_ModelName")
1474 local customWeapon = FindCustomWeapon(weaponModel)
1475 if(customWeapon != null){
1476 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.ATTACK, "Attack")
1477 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.JUMP, "Jump")
1478 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.DUCK, "Crouch")
1479 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.FORWARD, "Forward")
1480 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.BACKWARD, "Backward")
1481 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.USE, "Use")
1482 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.CANCEL, "Cancel")
1483 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.LEFT, "Left")
1484 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.RIGHT, "Right")
1485 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.MOVELEFT, "MoveLeft")
1486 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.MOVERIGHT, "MoveRight")
1487 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.ATTACK2, "Attack2")
1488 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.RUN, "Run")
1489 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.RELOAD, "Reload")
1490 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.ALT1, "Alt1")
1491 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.ALT2, "Alt2")
1492 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.SHOWSCORES, "Showscores")
1493 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.SPEED, "Speed")
1494 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.WALK, "Walk")
1495 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.ZOOM, "Zoom")
1496 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.WEAPON1, "Weapon1")
1497 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.WEAPON2, "Weapon2")
1498 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.BULLRUSH, "Bullrush")
1499 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.GRENADE1, "Grenade1")
1500 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.GRENADE2, "Grenade2")
1501 CallKeyPressFunctions(player, customWeapon.GetScope(), Keys.LOOKSPIN, "Lookspin")
1502
1503 player.SetLastWeapon(player.GetEntity().GetActiveWeapon())
1504 } else {
1505 player.SetLastWeapon(player.GetEntity().GetActiveWeapon())
1506 }
1507 CallWeaponEquipFunctions(player, weaponModel)
1508
1509
1510 local currentWeapons = []
1511 local newWeapons = []
1512 local droppedWeapons = player.GetLastWeaponsArray()
1513
1514 local inventoryIndex = 0
1515 local item = null
1516
1517 while(inventoryIndex < 5){
1518 item = NetProps.GetPropEntityArray(player.GetEntity(), "m_hMyWeapons", inventoryIndex)
1519 if(item != null){
1520 currentWeapons.append(item)
1521 newWeapons.append(item)
1522 }
1523 inventoryIndex += 1
1524 }
1525
1526 if(player.GetLastWeaponsArray() == null){
1527 droppedWeapons = currentWeapons
1528 }
1529
1530 for(local i=0;i < droppedWeapons.len();i+=1){
1531 for(local j=0;j < newWeapons.len();j+=1){
1532 if(i < droppedWeapons.len() && droppedWeapons[i] != null){
1533 if(newWeapons != null && droppedWeapons != null && newWeapons[j] != null && droppedWeapons[i] != null && newWeapons[j].IsValid() && droppedWeapons[i].IsValid() && newWeapons[j].GetEntityIndex() == droppedWeapons[i].GetEntityIndex()){
1534 newWeapons.remove(j)
1535 droppedWeapons.remove(i)
1536 if(i != 0){
1537 i -= 1
1538 }
1539 j -= 1
1540 }
1541 }
1542 }
1543 }
1544
1545 if(newWeapons.len() > 0) {
1546 foreach(ent in newWeapons){
1547 foreach(weapon in customWeapons){
1548 if(NetProps.GetPropString(ent, "m_ModelName") == weapon.GetViewmodel()){
1549 CallFunction(weapon.GetScope(), "OnPickup", ent, player.GetEntity())
1550 }
1551 }
1552 }
1553 }
1554 if(droppedWeapons.len() > 0){
1555 foreach(ent in droppedWeapons){
1556 foreach(weapon in customWeapons){
1557 if(NetProps.GetPropString(ent, "m_ModelName") == weapon.GetWorldModel()){
1558 CallFunction(weapon.GetScope(), "OnDrop", ent, player.GetEntity())
1559 }
1560 }
1561 }
1562 }
1563 if(newWeapons.len() > 0 || droppedWeapons.len() > 0){
1564 foreach(scope in hookScripts){
1565 CallInventoryChangeFunction(scope, player.GetEntity(), droppedWeapons, newWeapons)
1566 }
1567 }
1568
1569 player.SetLastWeaponsArray(currentWeapons)
1570 }
1571 }
1572 }
1573 }
1574
1575 for(local i=0; i<tasks.len(); i+=1){
1576 if(tasks[i].ReachedTime()){
1577 try{
1578 tasks[i].CallFunction()
1579 } catch(e){
1580 printl(e)
1581 }
1582 tasks.remove(i)
1583 i -= 1
1584 }
1585 }
1586}
1587
1588function ImprovedMethodsIncluded(){
1589 return improvedMethods
1590}
1591
1592/**
1593 * Adds various useful methods to common classes such as CBaseEntity and CTerrorPlayer
1594 */
1595function IncludeImprovedMethods(){
1596
1597 local func_CBaseEntity = function(){
1598 CBaseEntity["HasProp"] <- function(propertyName){return NetProps.HasProp(this, propertyName)}
1599 CBaseEntity["GetPropType"] <- function(propertyName){return NetProps.GetPropType(this, propertyName)}
1600 CBaseEntity["GetPropArraySize"] <- function(propertyName){return NetProps.GetPropArraySize(this, propertyName)}
1601
1602 CBaseEntity["GetPropInt"] <- function(propertyName){return NetProps.GetPropInt(this, propertyName)}
1603 CBaseEntity["GetPropEntity"] <- function(propertyName){return NetProps.GetPropEntity(this, propertyName)}
1604 CBaseEntity["GetPropString"] <- function(propertyName){return NetProps.GetPropString(this, propertyName)}
1605 CBaseEntity["GetPropFloat"] <- function(propertyName){return NetProps.GetPropFloat(this, propertyName)}
1606 CBaseEntity["GetPropVector"] <- function(propertyName){return NetProps.GetPropVector(this, propertyName)}
1607 CBaseEntity["SetPropInt"] <- function(propertyName, value){NetProps.SetPropInt(this, propertyName, value)}
1608 CBaseEntity["SetPropEntity"] <- function(propertyName, value){NetProps.SetPropEntity(this, propertyName, value)}
1609 CBaseEntity["SetPropString"] <- function(propertyName, value){NetProps.SetPropString(this, propertyName, value)}
1610 CBaseEntity["SetPropFloat"] <- function(propertyName, value){NetProps.SetPropFloat(this, propertyName, value)}
1611 CBaseEntity["SetPropVector"] <- function(propertyName, value){NetProps.SetPropVector(this, propertyName, value)}
1612
1613 CBaseEntity["GetPropIntArray"] <- function(propertyName, index){return NetProps.GetPropIntArray(this, propertyName, index)}
1614 CBaseEntity["GetPropEntityArray"] <- function(propertyName, index){return NetProps.GetPropEntityArray(this, propertyName, index)}
1615 CBaseEntity["GetPropStringArray"] <- function(propertyName, index){return NetProps.GetPropStringArray(this, propertyName, index)}
1616 CBaseEntity["GetPropFloatArray"] <- function(propertyName, index){return NetProps.GetPropFloatArray(this, propertyName, index)}
1617 CBaseEntity["GetPropVectorArray"] <- function(propertyName, index){return NetProps.GetPropVectorArray(this, propertyName, index)}
1618 CBaseEntity["SetPropIntArray"] <- function(propertyName, index, value){NetProps.SetPropIntArray(this, propertyName, value, index)}
1619 CBaseEntity["SetPropEntityArray"] <- function(propertyName, index, value){NetProps.SetPropEntityArray(this, propertyName, value, index)}
1620 CBaseEntity["SetPropStringArray"] <- function(propertyName, index, value){NetProps.SetPropStringArray(this, propertyName, value, index)}
1621 CBaseEntity["SetPropFloatArray"] <- function(propertyName, index, value){NetProps.SetPropFloatArray(this, propertyName, value, index)}
1622 CBaseEntity["SetPropVectorArray"] <- function(propertyName, index, value){NetProps.SetPropVectorArray(this, propertyName, value, index)}
1623
1624 CBaseEntity["SetProp"] <- function(propertyName, value, index = null){
1625 if(GetPropType(propertyName) == "integer"){
1626 if(GetPropArraySize(propertyName) > 0){
1627 if(typeof(value) == "array"){
1628 for(local i=0; i < value.len(); i++){
1629 SetPropIntArray(propertyName, i, value[i])
1630 }
1631 } else {
1632 SetPropIntArray(propertyName, index, value)
1633 }
1634 } else {
1635 SetPropInt(propertyName, value)
1636 }
1637 } else if(GetPropType(propertyName) == "float"){
1638 if(GetPropArraySize(propertyName) > 0){
1639 if(typeof(value) == "array"){
1640 for(local i=0; i < value.len(); i++){
1641 SetPropFloatArray(propertyName, i, value[i])
1642 }
1643 } else {
1644 SetPropFloatArray(propertyName, index, value)
1645 }
1646 } else {
1647 SetPropFloat(propertyName, value)
1648 }
1649 } else if(GetPropType(propertyName) == "Vector"){
1650 if(GetPropArraySize(propertyName) > 0){
1651 if(typeof(value) == "array"){
1652 for(local i=0; i < value.len(); i++){
1653 SetPropVectorArray(propertyName, i, value[i])
1654 }
1655 } else {
1656 SetPropVectorArray(propertyName, index, value)
1657 }
1658 } else {
1659 SetPropVector(propertyName, value)
1660 }
1661 } else if(GetPropType(propertyName) == "string"){
1662 if(GetPropArraySize(propertyName) > 0){
1663 if(typeof(value) == "array"){
1664 for(local i=0; i < value.len(); i++){
1665 SetPropStringArray(propertyName, i, value[i])
1666 }
1667 } else {
1668 SetPropStringArray(propertyName, index, value)
1669 }
1670 } else {
1671 SetPropString(propertyName, value)
1672 }
1673 }
1674 }
1675 CBaseEntity["GetProp"] <- function(propertyName, index = null, asArray = false){
1676 if(GetPropType(propertyName) == "integer"){
1677 if(GetPropArraySize(propertyName) > 0){
1678 if(asArray){
1679 local netpropArray = []
1680 for(local i=0; i < GetPropArraySize(propertyName); i++){
1681 netpropArray.append(GetPropIntArray(propertyName, i))
1682 }
1683 return netpropArray
1684 }
1685 return GetPropIntArray(propertyName, index)
1686 } else {
1687 return GetPropInt(propertyName)
1688 }
1689 } else if(GetPropType(propertyName) == "float"){
1690 if(GetPropArraySize(propertyName) > 0){
1691 if(asArray){
1692 local netpropArray = []
1693 for(local i=0; i < GetPropArraySize(propertyName); i++){
1694 netpropArray.append(GetPropFloatArray(propertyName, i))
1695 }
1696 return netpropArray
1697 }
1698 return GetPropFloatArray(propertyName, index)
1699 } else {
1700 return GetPropFloat(propertyName)
1701 }
1702 } else if(GetPropType(propertyName) == "Vector"){
1703 if(GetPropArraySize(propertyName) > 0){
1704 if(asArray){
1705 local netpropArray = []
1706 for(local i=0; i < GetPropArraySize(propertyName); i++){
1707 netpropArray.append(GetPropVectorArray(propertyName, i))
1708 }
1709 return netpropArray
1710 }
1711 return GetPropVectorArray(propertyName, index)
1712 } else {
1713 return GetPropVector(propertyName)
1714 }
1715 } else if(GetPropType(propertyName) == "string"){
1716 if(GetPropArraySize(propertyName) > 0){
1717 if(asArray){
1718 local netpropArray = []
1719 for(local i=0; i < GetPropArraySize(propertyName); i++){
1720 netpropArray.append(GetPropStringArray(propertyName, i))
1721 }
1722 return netpropArray
1723 }
1724 return GetPropStringArray(propertyName, index)
1725 } else {
1726 return GetPropString(propertyName)
1727 }
1728 }
1729 }
1730
1731 CBaseEntity["SetRenderFX"] <- function(value){SetProp("m_nRenderFX", value.tointeger())}
1732 CBaseEntity["GetRenderFX"] <- function(){return GetProp("m_nRenderFX")}
1733
1734 CBaseEntity["SetRenderMode"] <- function(value){SetProp("m_nRenderMode", value.tointeger())}
1735 CBaseEntity["GetRenderMode"] <- function(){return GetProp("m_nRenderMode")}
1736
1737 CBaseEntity["GetModelIndex"] <- function(){return GetPropInt("m_nModelIndex")}
1738 CBaseEntity["GetModelName"] <- function(){return GetPropString("m_ModelName")}
1739
1740 CBaseEntity["SetName"] <- function(name){SetPropString("m_iName", name)}
1741
1742 CBaseEntity["GetFriction"] <- function(){return GetFriction(this)}
1743 CBaseEntity["GetPhysVelocity"] <- function(){return GetPhysVelocity(this)}
1744
1745 CBaseEntity["GetFlags"] <- function(){return GetPropInt("m_fFlags")}
1746 CBaseEntity["SetFlags"] <- function(flag){SetPropInt("m_fFlags", flag)}
1747 CBaseEntity["AddFlag"] <- function(flag){SetPropInt("m_fFlags", GetPropInt("m_fFlags") | flag)}
1748 CBaseEntity["RemoveFlag"] <- function(flag){SetPropInt("m_fFlags", GetPropInt("m_fFlags") & ~flag)}
1749 CBaseEntity["HasFlag"] <- function(flag){return GetFlags() & flag}
1750
1751 CBaseEntity["GetMoveType"] <- function(){return GetPropInt("movetype")}
1752 CBaseEntity["SetMoveType"] <- function(type){SetPropInt("movetype", type)}
1753
1754 CBaseEntity["GetSpawnflags"] <- function(){return GetPropInt("m_spawnflags")}
1755 CBaseEntity["SetSpawnFlags"] <- function(flags){SetPropInt("m_spawnflags", flags)}
1756
1757 CBaseEntity["GetGlowType"] <- function(){return GetPropInt("m_Glow.m_iGlowType")}
1758 CBaseEntity["SetGlowType"] <- function(type){SetPropInt("m_Glow.m_iGlowType", type)}
1759
1760 CBaseEntity["GetGlowRange"] <- function(){return GetPropInt("m_Glow.m_nGlowRange")}
1761 CBaseEntity["SetGlowRange"] <- function(range){SetPropInt("m_Glow.m_nGlowRange", range)}
1762
1763 CBaseEntity["GetGlowRangeMin"] <- function(){return GetPropInt("m_Glow.m_nGlowRangeMin")}
1764 CBaseEntity["SetGlowRangeMin"] <- function(range){SetPropInt("m_Glow.m_nGlowRangeMin", range)}
1765
1766 CBaseEntity["GetGlowColor"] <- function(){return GetPropInt("m_Glow.m_glowColorOverride")}
1767 CBaseEntity["SetGlowColor"] <- function(r, g, b){
1768 local color = r
1769 color += 256 * g
1770 color += 65536 * b
1771 SetPropInt("m_Glow.m_glowColorOverride", color)
1772 }
1773 CBaseEntity["SetGlowColorVector"] <- function(vector){
1774 local color = vector.x
1775 color += 256 * vector.y
1776 color += 65536 * vector.z
1777 SetPropInt("m_Glow.m_glowColorOverride", color)
1778 }
1779 CBaseEntity["ResetGlowColor"] <- function(){SetPropInt("m_Glow.m_glowColorOverride", -1)}
1780
1781 CBaseEntity["SetTeam"] <- function(team){SetPropInt("m_iTeamNum", team.tointeger())}
1782 CBaseEntity["GetTeam"] <- function(){return GetPropInt("m_iTeamNum")}
1783
1784 CBaseEntity["GetGlowFlashing"] <- function(){return GetPropInt("m_Glow.m_bFlashing")}
1785 CBaseEntity["SetGlowFlashing"] <- function(flashing){SetPropInt("m_Glow.m_bFlashing", flashing)}
1786
1787 CBaseEntity["GetFlowDistance"] <- function(){return GetFlowDistanceForPosition(GetOrigin())}
1788 CBaseEntity["GetFlowPercent"] <- function(){return GetFlowPercentForPosition(GetOrigin())}
1789
1790 CBaseEntity["PlaySound"] <- function(soundName){EmitSoundOn(soundName, this)}
1791 CBaseEntity["StopSound"] <- function(soundName){StopSoundOn(soundName, this)}
1792
1793 CBaseEntity["Input"] <- function(input, value = "", delay = 0, activator = null){DoEntFire("!self", input.tostring(), value.tostring(), delay.tofloat(), activator, this)}
1794 CBaseEntity["SetAlpha"] <- function(alpha){Input("Alpha", alpha)}
1795 CBaseEntity["Enable"] <- function(){Input("Enable")}
1796 CBaseEntity["Disable"] <- function(){Input("Disable")}
1797 CBaseEntity["GetValidatedScriptScope"] <- function(){
1798 ValidateScriptScope()
1799 return GetScriptScope()
1800 }
1801
1802
1803 // Beginning of entity specific NetProps
1804 CBaseEntity["SetStartScale"] <- function(startScale){SetProp("m_flStartScale", startScale.tofloat())}
1805 CBaseEntity["GetStartScale"] <- function(){return GetProp("m_flStartScale")}
1806
1807 CBaseEntity["SetScale"] <- function(scale){SetProp("m_flScale", scale.tofloat())}
1808 CBaseEntity["GetScale"] <- function(){return GetProp("m_flScale")}
1809
1810 CBaseEntity["SetScaleTime"] <- function(scaleTime){SetProp("m_flScaleTime", scaleTime.tofloat())}
1811 CBaseEntity["GetScaleTime"] <- function(){return GetProp("m_flScaleTime")}
1812
1813 CBaseEntity["SetFlags"] <- function(flags){SetProp("m_nFlags", flags.tointeger())}
1814 CBaseEntity["GetFlags"] <- function(){return GetProp("m_nFlags")}
1815
1816 CBaseEntity["SetFlameModelIndex"] <- function(flameModelIndex){SetProp("m_nFlameModelIndex", flameModelIndex.tointeger())}
1817 CBaseEntity["GetFlameModelIndex"] <- function(){return GetProp("m_nFlameModelIndex")}
1818
1819 CBaseEntity["SetFlameFromAboveModelIndex"] <- function(flameFromAboveModelIndex){SetProp("m_nFlameFromAboveModelIndex", flameFromAboveModelIndex.tointeger())}
1820 CBaseEntity["GetFlameFromAboveModelIndex"] <- function(){return GetProp("m_nFlameFromAboveModelIndex")}
1821
1822
1823 CBaseEntity["SetStartScale"] <- function(startScale){SetProp("m_flStartScale", startScale.tofloat())}
1824 CBaseEntity["GetStartScale"] <- function(){return GetProp("m_flStartScale")}
1825
1826 CBaseEntity["SetScale"] <- function(scale){SetProp("m_flScale", scale.tofloat())}
1827 CBaseEntity["GetScale"] <- function(){return GetProp("m_flScale")}
1828
1829 CBaseEntity["SetScaleTime"] <- function(scaleTime){SetProp("m_flScaleTime", scaleTime.tofloat())}
1830 CBaseEntity["GetScaleTime"] <- function(){return GetProp("m_flScaleTime")}
1831
1832 CBaseEntity["SetPlasmaModelIndex"] <- function(plasmaModelIndex){SetProp("m_nPlasmaModelIndex", plasmaModelIndex.tointeger())}
1833 CBaseEntity["GetPlasmaModelIndex"] <- function(){return GetProp("m_nPlasmaModelIndex")}
1834
1835 CBaseEntity["SetPlasmaModelIndex2"] <- function(plasmaModelIndex2){SetProp("m_nPlasmaModelIndex2", plasmaModelIndex2.tointeger())}
1836 CBaseEntity["GetPlasmaModelIndex2"] <- function(){return GetProp("m_nPlasmaModelIndex2")}
1837
1838 CBaseEntity["SetGlowModelIndex"] <- function(glowModelIndex){SetProp("m_nGlowModelIndex", glowModelIndex.tointeger())}
1839 CBaseEntity["GetGlowModelIndex"] <- function(){return GetProp("m_nGlowModelIndex")}
1840
1841
1842 CBaseEntity["SetCharging"] <- function(charging){SetProp("m_isCharging", charging.tointeger())}
1843 CBaseEntity["IsCharging"] <- function(){return GetProp("m_isCharging")}
1844
1845 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
1846 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
1847
1848 CBaseEntity["SetChargeStartTime"] <- function(chargeStartTime){SetProp("m_chargeStartTime", chargeStartTime.tofloat())}
1849 CBaseEntity["GetChargeStartTime"] <- function(){return GetProp("m_chargeStartTime")}
1850
1851 CBaseEntity["SetPotentialTarget"] <- function(potentialTarget){SetPropEntity("m_hPotentialTarget", potentialTarget)}
1852 CBaseEntity["GetPotentialTarget"] <- function(){return GetPropEntity("m_hPotentialTarget")}
1853
1854
1855 CBaseEntity["SetLeaping"] <- function(leaping){SetProp("m_isCharging", leaping.tointeger())}
1856 CBaseEntity["IsLeaping"] <- function(){return GetProp("m_isLeaping")}
1857
1858 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
1859 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
1860
1861 CBaseEntity["SetLeapStartTime"] <- function(leapStartTime){SetProp("m_leapStartTime", leapStartTime.tofloat())}
1862 CBaseEntity["GetLeapStartTime"] <- function(){return GetProp("m_leapStartTime")}
1863
1864 CBaseEntity["SetQueuedLeap"] <- function(queuedLeap){SetProp("m_queuedLeap", queuedLeap)}
1865 CBaseEntity["GetQueuedLeap"] <- function(){return GetProp("m_queuedLeap")}
1866
1867
1868 CBaseEntity["SetLunging"] <- function(lunging){SetProp("m_isCharging", lunging.tointeger())}
1869 CBaseEntity["IsLunging"] <- function(){return GetProp("m_isLunging")}
1870
1871 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
1872 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
1873
1874 CBaseEntity["SetLungeStartTime"] <- function(lungeStartTime){SetProp("m_lungeStartTime", lungeStartTime.tofloat())}
1875 CBaseEntity["GetLungeStartTime"] <- function(){return GetProp("m_lungeStartTime")}
1876
1877 CBaseEntity["SetQueuedLeap"] <- function(queuedLeap){SetProp("m_queuedLeap", queuedLeap)}
1878 CBaseEntity["GetQueuedLeap"] <- function(){return GetProp("m_queuedLeap")}
1879
1880
1881 CBaseEntity["SetActivated"] <- function(hasBeenActivated){SetProp(m_bHasBeenActivated, hasBeenActivated.tointeger())}
1882 CBaseEntity["HasBeenActivated"] <- function(){return GetProp("m_bHasBeenActivated")}
1883
1884 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
1885 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
1886
1887
1888 CBaseEntity["SetActivated"] <- function(hasBeenActivated){SetProp(m_bHasBeenActivated, hasBeenActivated.tointeger())}
1889 CBaseEntity["HasBeenActivated"] <- function(){return GetProp("m_bHasBeenActivated")}
1890
1891 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
1892 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
1893
1894
1895 CBaseEntity["SetTongueGrabStartingHealth"] <- function(tongueGrabStartingHealth){SetProp("m_tongueGrabStartingHealth", tongueGrabStartingHealth.tointeger())}
1896 CBaseEntity["GetTongueGrabStartingHealth"] <- function(){return GetProp("m_tongueGrabStartingHealth")}
1897
1898 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
1899 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
1900
1901 CBaseEntity["SetTongueHitRange"] <- function(tongueHitRange){SetProp("m_tongueHitRange", tongueHitRange.tofloat())}
1902 CBaseEntity["GetTongueHitRange"] <- function(){return GetProp("m_tongueHitRange")}
1903
1904 CBaseEntity["SetTongueHitTimestamp"] <- function(tongueHitTimestamp){SetProp("m_tongueHitTimestamp", tongueHitTimestamp.tofloat())}
1905 CBaseEntity["GetTongueHitTimestamp"] <- function(){return GetProp("m_tongueHitTimestamp")}
1906
1907 CBaseEntity["SetTongueHitWasAmbush"] <- function(tongueHitWasAmbush){SetProp("m_tongueHitWasAmbush", tongueHitWasAmbush.tointeger())}
1908 CBaseEntity["GetTongueHitWasAmbush"] <- function(){return GetProp("m_tongueHitWasAmbush")}
1909
1910 CBaseEntity["SetTongueVictimDistance"] <- function(tongueVictimDistance){SetProp("m_tongueVictimDistance", tongueVictimDistance.tofloat())}
1911 CBaseEntity["GetTongueVictimDistance"] <- function(){return GetProp("m_tongueVictimDistance")}
1912
1913 CBaseEntity["SetTongueVictimPositionTime"] <- function(tongueVictimPositionTime){SetProp("m_tongueVictimPositionTime", tongueVictimPositionTime.tofloat())}
1914 CBaseEntity["GetTongueVictimPositionTime"] <- function(){return GetProp("m_tongueVictimPositionTime")}
1915
1916 CBaseEntity["SetTongueVictimLastOnGroundTime"] <- function(tongueVictimLastOnGroundTime){SetProp("m_tongueVictimLastOnGroundTime", tongueVictimLastOnGroundTime.tofloat())}
1917 CBaseEntity["GetTongueVictimLastOnGroundTime"] <- function(){return GetProp("m_tongueVictimLastOnGroundTime")}
1918
1919 CBaseEntity["SetPotentialTarget"] <- function(potentialTarget){SetPropEntity("m_hPotentialTarget", potentialTarget)}
1920 CBaseEntity["GetPotentialTarget"] <- function(){return GetPropEntity("m_hPotentialTarget")}
1921
1922 CBaseEntity["SetCurrentTipTarget"] <- function(currentTipTarget){SetPropEntity("m_currentTipTarget", currentTipTarget)}
1923 CBaseEntity["GetCurrentTipTarget"] <- function(){return GetPropEntity("m_currentTipTarget")}
1924
1925 CBaseEntity["SetTongueState"] <- function(tongueState){SetProp("m_tongueState", tongueState.tointeger())}
1926 CBaseEntity["GetTongueState"] <- function(){return GetProp("m_tongueState")}
1927
1928 CBaseEntity["SetBendPointCount"] <- function(bendPointCount){SetProp("m_bendPointCount", bendPointCount.tointeger())}
1929 CBaseEntity["GetBendPointCount"] <- function(){return GetProp("m_bendPointCount")}
1930
1931 CBaseEntity["SetTipPosition"] <- function(tipPosition){SetProp("m_tipPosition", tipPosition)}
1932 CBaseEntity["GetTipPosition"] <- function(){return GetProp("m_tipPosition")}
1933
1934 CBaseEntity["SetBendPositions"] <- function(bendPositions){SetProp("m_bendPositions", bendPositions)}
1935 CBaseEntity["GetBendPositions"] <- function(){return GetProp("m_bendPositions", null, true)}
1936 CBaseEntity["SetBendPosition"] <- function(bendPosition, index){SetProp("m_bendPositions", bendPosition, index)}
1937 CBaseEntity["GetBendPosition"] <- function(index){return GetProp("m_bendPositions", index)}
1938
1939
1940 CBaseEntity["SetSpraying"] <- function(spraying){SetProp("m_isSpraying", spraying.tointeger())}
1941 CBaseEntity["IsSpraying"] <- function(){return GetProp("m_isSpraying")}
1942
1943 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
1944 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
1945
1946 CBaseEntity["SetAttackDuration"] <- function(attackDuration){SetProp("m_attackDuration.m_duration", attackDuration.tofloat())}
1947 CBaseEntity["GetAttackDuration"] <- function(){return GetProp("m_attackDuration.m_duration")}
1948 CBaseEntity["SetAttackDurationTimestamp"] <- function(attackDurationTimestamp){SetProp("m_attackDuration.m_timestamp", attackDurationTimestamp.tofloat())}
1949 CBaseEntity["GetAttackDurationTimestamp"] <- function(){return GetProp("m_attackDuration.m_timestamp")}
1950
1951 CBaseEntity["SetNextSprayDuration"] <- function(nextSprayDuration){SetProp("m_nextSpray.m_duration", nextSprayDuration.tofloat())}
1952 CBaseEntity["GetNextSprayDuration"] <- function(){return GetProp("m_nextSpray.m_duration")}
1953 CBaseEntity["SetNextSprayTimestamp"] <- function(nextSprayTimestamp){SetProp("m_nextSpray.m_timestamp", nextSprayTimestamp.tofloat())}
1954 CBaseEntity["GetNextSprayTimestamp"] <- function(){return GetProp("m_nextSpray.m_timestamp")}
1955
1956
1957 CBaseEntity["SetBeamType"] <- function(beamType){SetProp("m_nBeamType", beamType.tointeger())}
1958 CBaseEntity["GetBeamType"] <- function(){return GetProp("m_nBeamType")}
1959
1960 CBaseEntity["SetBeamFlags"] <- function(beamFlags){SetProp("m_nBeamFlags", beamFlags.tointeger())}
1961 CBaseEntity["GetBeamFlags"] <- function(){return GetProp("m_nBeamFlags")}
1962
1963 CBaseEntity["SetNumBeamEnts"] <- function(numBeamEnts){SetProp("m_nNumBeamEnts", numBeamEnts.tointeger())}
1964 CBaseEntity["GetNumBeamEnts"] <- function(){return GetProp("m_nNumBeamEnts")}
1965
1966 CBaseEntity["SetAttachEntity"] <- function(attachEntity, index){SetPropEntityArray("m_hAttachEntity", attachEntity, index)}
1967 CBaseEntity["GetAttachEntity"] <- function(index){return GetPropEntityArray("m_hAttachEntity", index)}
1968
1969 CBaseEntity["SetAttachIndexes"] <- function(attachIndexes){SetProp("m_nAttachIndex", attachIndexes)}
1970 CBaseEntity["GetAttachIndexes"] <- function(){return GetProp("m_nAttachIndex")}
1971 CBaseEntity["SetAttachIndex"] <- function(attachIndex, index){SetProp("m_nAttachIndex", attachIndex.tointeger(), index)}
1972 CBaseEntity["GetAttachIndex"] <- function(index){return GetProp("m_nAttachIndex", index)}
1973
1974 CBaseEntity["SetHaloIndex"] <- function(haloIndex){SetProp("m_nHaloIndex", haloIndex.tointeger())}
1975 CBaseEntity["GetHaloIndex"] <- function(){return GetProp("m_nHaloIndex")}
1976
1977 CBaseEntity["SetHaloScale"] <- function(haloScale){SetProp("m_fHaloScale", haloScale.tofloat())}
1978 CBaseEntity["GetHaloScale"] <- function(){return GetProp("m_fHaloScale")}
1979
1980 CBaseEntity["SetWidth"] <- function(width){SetProp("m_fWidth", width.tofloat())}
1981 CBaseEntity["GetWidth"] <- function(){return GetProp("m_fWidth")}
1982
1983 CBaseEntity["SetEndWidth"] <- function(endWidth){SetProp("m_fEndWidth", endWidth.tofloat())}
1984 CBaseEntity["GetEndWidth"] <- function(){return GetProp("m_fEndWidth")}
1985
1986 CBaseEntity["SetFadeLength"] <- function(fadeLength){SetProp("m_fFadeLength", fadeLength.tofloat())}
1987 CBaseEntity["GetFadeLength"] <- function(){return GetProp("m_fFadeLength")}
1988
1989 CBaseEntity["SetAmplitude"] <- function(amplitude){SetProp("m_fAmplitude", amplitude.tofloat())}
1990 CBaseEntity["GetAmplitude"] <- function(){return GetProp("m_fAmplitude")}
1991
1992 CBaseEntity["SetStartFrame"] <- function(startFrame){SetProp("m_fStartFrame", startFrame.tofloat())}
1993 CBaseEntity["GetStartFrame"] <- function(){return GetProp("m_fStartFrame")}
1994
1995 CBaseEntity["SetSpeed"] <- function(speed){SetProp("m_fSpeed", speed.tofloat())}
1996 CBaseEntity["GetSpeed"] <- function(){return GetProp("m_fSpeed")}
1997
1998 CBaseEntity["SetFrameRate"] <- function(frameRate){SetProp("m_flFrameRate", frameRate.tofloat())}
1999 CBaseEntity["GetFrameRate"] <- function(){return GetProp("m_flFrameRate")}
2000
2001 CBaseEntity["SetHDRColorScale"] <- function(HDRColorScale){SetProp("m_flHDRColorScale", HDRColorScale.tofloat())}
2002 CBaseEntity["GetHDRColorScale"] <- function(){return GetProp("m_flHDRColorScale")}
2003
2004 CBaseEntity["SetFrame"] <- function(frame){SetProp("m_flFrame", frame.tofloat())}
2005 CBaseEntity["GetFrame"] <- function(){return GetProp("m_flFrame")}
2006
2007 CBaseEntity["SetEndPos"] <- function(endPos){SetProp("m_vecEndPos", endPos)}
2008 CBaseEntity["GetEndPos"] <- function(){return GetProp("m_vecEndPos")}
2009
2010
2011 CBaseEntity["SetHaloIndex"] <- function(haloIndex){SetProp("m_nHaloIndex", haloIndex.tointeger())}
2012 CBaseEntity["GetHaloIndex"] <- function(){return GetProp("m_nHaloIndex")}
2013
2014 CBaseEntity["SetSpotlightOn"] <- function(spotlightOn){SetProp("m_bSpotlightOn", spotlightOn.tointeger())}
2015 CBaseEntity["IsSpotlightOn"] <- function(){return GetProp("m_bSpotlightOn")}
2016
2017 CBaseEntity["SetHasDynamicLight"] <- function(hasDynamicLight){SetProp("m_bHasDynamicLight", hasDynamicLight.tointeger())}
2018 CBaseEntity["HasDynamicLight"] <- function(){return GetProp("m_bHasDynamicLight")}
2019
2020 CBaseEntity["SetNoFog"] <- function(noFog){SetProp("m_bNoFog", noFog.tointeger())}
2021 CBaseEntity["GetNoFog"] <- function(){return GetProp("m_bNoFog")}
2022
2023 CBaseEntity["SetSpotlightMaxLength"] <- function(spotlightMaxLength){SetProp("m_flSpotlightMaxLength", spotlightMaxLength.tofloat())}
2024 CBaseEntity["GetSpotlightMaxLength"] <- function(){return GetProp("m_flSpotlightMaxLength")}
2025
2026 CBaseEntity["SetSpotlightGoalWidth"] <- function(spotlightGoalWidth){SetProp("m_flSpotlightGoalWidth", spotlightGoalWidth.tofloat())}
2027 CBaseEntity["GetSpotlightGoalWidth"] <- function(){return GetProp("m_flSpotlightGoalWidth")}
2028
2029 CBaseEntity["SetHDRColorScale"] <- function(HDRColorScale){SetProp("m_flHDRColorScale", HDRColorScale.tofloat())}
2030 CBaseEntity["GetHDRColorScale"] <- function(){return GetProp("m_flHDRColorScale")}
2031
2032 CBaseEntity["SetRotationSpeed"] <- function(rotationSpeed){SetProp("m_flRotationSpeed", rotationSpeed.tofloat())}
2033 CBaseEntity["GetRotationSpeed"] <- function(){return GetProp("m_flRotationSpeed")}
2034
2035 CBaseEntity["SetRotationAxis"] <- function(rotationAxis){SetProp("m_nRotationAxis", rotationAxis.tointeger())}
2036 CBaseEntity["GetRotationAxis"] <- function(){return GetProp("m_nRotationAxis")}
2037
2038 CBaseEntity["SetRotating"] <- function(value){SetProp("m_isRotating", value.tointeger())}
2039 CBaseEntity["GetRotating"] <- function(value){return GetProp("m_isRotating")}
2040
2041 CBaseEntity["SetReversed"] <- function(value){SetProp("m_isReversed", value.tointeger())}
2042 CBaseEntity["GetReversed"] <- function(value){return GetProp("m_isReversed")}
2043
2044
2045 CBaseEntity["SetPosX"] <- function(posX, index){SetProp("m_posX", posX.tointeger(), index)}
2046 CBaseEntity["GetPosX"] <- function(index){return GetProp("m_posX", index)}
2047
2048 CBaseEntity["SetPosX"] <- function(posX, index){SetProp("m_posY", posX.tointeger(), index)}
2049 CBaseEntity["GetPosX"] <- function(index){return GetProp("m_posY", index)}
2050
2051 CBaseEntity["SetPosX"] <- function(posX, index){SetProp("m_posZ", posX.tointeger(), index)}
2052 CBaseEntity["GetPosX"] <- function(index){return GetProp("m_posZ", index)}
2053
2054 CBaseEntity["SetPosCount"] <- function(posCount){SetProp("m_posCount", posCount.tointeger())}
2055 CBaseEntity["GetPosCount"] <- function(){return GetProp("m_posCount")}
2056
2057
2058 CBaseEntity["SetMinFalloff"] <- function(minFalloff){SetProp("m_MinFalloff", minFalloff.tofloat())}
2059 CBaseEntity["GetMinFalloff"] <- function(){return GetProp("m_MinFalloff")}
2060
2061 CBaseEntity["SetMaxFalloff"] <- function(maxFalloff){SetProp("m_MaxFalloff", maxFalloff.tofloat())}
2062 CBaseEntity["GetMaxFalloff"] <- function(){return GetProp("m_MaxFalloff")}
2063
2064 CBaseEntity["SetCurWeight"] <- function(curWeight){SetProp("m_flCurWeight", curWeight.tofloat())}
2065 CBaseEntity["GetCurWeight"] <- function(){return GetProp("m_flCurWeight")}
2066
2067 CBaseEntity["SetMaxWeight"] <- function(maxWeight){SetProp("m_flMaxWeight", maxWeight.tofloat())}
2068 CBaseEntity["GetMaxWeight"] <- function(){return GetProp("m_flMaxWeight")}
2069
2070 CBaseEntity["SetFadeInDuration"] <- function(fadeInDuration){SetProp("m_flFadeInDuration", fadeInDuration.tofloat())}
2071 CBaseEntity["GetFadeInDuration"] <- function(){return GetProp("m_flFadeInDuration")}
2072
2073 CBaseEntity["SetFadeOutDuration"] <- function(fadeOutDuration){SetProp("m_flFadeOutDuration", fadeOutDuration.tofloat())}
2074 CBaseEntity["GetFadeOutDuration"] <- function(){return GetProp("m_flFadeOutDuration")}
2075
2076 CBaseEntity["SetLookupFilename"] <- function(lookupFilename){SetProp("m_lookupFilename", lookupFilename.tostring())}
2077 CBaseEntity["GetLookupFilename"] <- function(){return GetProp("m_lookupFilename")}
2078
2079 CBaseEntity["SetEnabled"] <- function(enabled){SetProp("m_bEnabled", enabled.tointeger())}
2080 CBaseEntity["IsEnabled"] <- function(){return GetProp("m_bEnabled")}
2081
2082 CBaseEntity["SetMaster"] <- function(master){SetProp("m_bMaster", master.tointeger())}
2083 CBaseEntity["IsMaster"] <- function(){return GetProp("m_bMaster")}
2084
2085 CBaseEntity["SetClientside"] <- function(clientside){SetProp("m_bClientSide", clientside.tointeger())}
2086 CBaseEntity["IsClientside"] <- function(){return GetProp("m_bClientSide")}
2087
2088 CBaseEntity["SetExclusive"] <- function(exclusive){SetProp("m_bExclusive", exclusive.tointeger())}
2089 CBaseEntity["IsExclusive"] <- function(){return GetProp("m_bExclusive")}
2090
2091 CBaseEntity["SetTimeStartFadeIn"] <- function(value){SetProp("m_flTimeStartFadeIn", value.tofloat())}
2092 CBaseEntity["GetTimeStartFadeIn"] <- function(value){return GetProp("m_flTimeStartFadeIn")}
2093
2094 CBaseEntity["SetTimeStartFadeOut"] <- function(value){SetProp("m_flTimeStartFadeOut", value.tofloat())}
2095 CBaseEntity["GetTimeStartFadeOut"] <- function(value){return GetProp("m_flTimeStartFadeOut")}
2096
2097 CBaseEntity["SetStartFadeInWeight"] <- function(value){SetProp("m_flStartFadeInWeight", value.tofloat())}
2098 CBaseEntity["GetStartFadeInWeight"] <- function(value){return GetProp("m_flStartFadeInWeight")}
2099
2100 CBaseEntity["SetStartFadeOutWeight"] <- function(value){SetProp("m_flStartFadeOutWeight", value.tofloat())}
2101 CBaseEntity["GetStartFadeOutWeight"] <- function(value){return GetProp("m_flStartFadeOutWeight")}
2102
2103 CBaseEntity["SetStartDisabled"] <- function(value){SetProp("m_bStartDisabled", value.tointeger())}
2104 CBaseEntity["GetStartDisabled"] <- function(value){return GetProp("m_bStartDisabled")}
2105
2106
2107 CBaseEntity["SetEnabled"] <- function(enabled){SetProp("m_bEnabled", enabled.tointeger())}
2108 CBaseEntity["IsEnabled"] <- function(){return GetProp("m_bEnabled")}
2109
2110 CBaseEntity["SetMaxWeight"] <- function(maxWeight){SetProp("m_MaxWeight", maxWeight.tofloat())}
2111 CBaseEntity["GetMaxWeight"] <- function(){return GetProp("m_MaxWeight")}
2112
2113 CBaseEntity["SetFadeDuration"] <- function(fadeDuration){SetProp("m_FadeDuration", fadeDuration.tofloat())}
2114 CBaseEntity["GetFadeDuration"] <- function(){return GetProp("m_FadeDuration")}
2115
2116 CBaseEntity["SetLookupFilename"] <- function(lookupFilename){SetProp("m_lookupFilename", lookupFilename.tostring())}
2117 CBaseEntity["GetLookupFilename"] <- function(){return GetProp("m_lookupFilename")}
2118
2119 CBaseEntity["SetStartDisabled"] <- function(value){SetProp("m_bStartDisabled", value.tointeger())}
2120 CBaseEntity["GetStartDisabled"] <- function(value){return GetProp("m_bStartDisabled")}
2121
2122 CBaseEntity["SetWeight"] <- function(value){SetProp("m_Weight", value.tofloat())}
2123 CBaseEntity["GetWeight"] <- function(value){return GetProp("m_Weight")}
2124
2125 CBaseEntity["SetLastEnterWeight"] <- function(value){SetProp("m_LastEnterWeight", value.tofloat())}
2126 CBaseEntity["GetLastEnterWeight"] <- function(value){return GetProp("m_LastEnterWeight")}
2127
2128 CBaseEntity["SetLastEnterTime"] <- function(value){SetProp("m_LastEnterTime", value.tofloat())}
2129 CBaseEntity["GetLastEnterTime"] <- function(value){return GetProp("m_LastEnterTime")}
2130
2131 CBaseEntity["SetLastExitWeight"] <- function(value){SetProp("m_LastExitWeight", value.tofloat())}
2132 CBaseEntity["GetLastExitWeight"] <- function(value){return GetProp("m_LastExitWeight")}
2133
2134 CBaseEntity["SetLastExitTime"] <- function(value){SetProp("m_LastExitTime", value.tofloat())}
2135 CBaseEntity["GetLastExitTime"] <- function(value){return GetProp("m_LastExitTime")}
2136
2137
2138 CBaseEntity["SetFreezePeriod"] <- function(freezePeriod){SetProp("m_bFreezePeriod", freezePeriod.tointeger())}
2139 CBaseEntity["GetFreezePeriod"] <- function(){return GetProp("m_bFreezePeriod")}
2140
2141 CBaseEntity["SetRoundTime"] <- function(roundTime){SetProp("m_iRoundTime", roundTime.tointeger())}
2142 CBaseEntity["GetRoundTime"] <- function(){return GetProp("m_iRoundTime")}
2143
2144 CBaseEntity["SetLevelStartTime"] <- function(levelStartTime){SetProp("m_fLevelStartTime", levelStartTime.tofloat())}
2145 CBaseEntity["GetLevelStartTime"] <- function(){return GetProp("m_fLevelStartTime")}
2146
2147 CBaseEntity["SetGameStartTime"] <- function(gameStartTime){SetProp("m_flGameStartTime", gameStartTime.tofloat())}
2148 CBaseEntity["GetGameStartTime"] <- function(){return GetProp("m_flGameStartTime")}
2149
2150 CBaseEntity["SetHostagesRemaining"] <- function(hostagesRemaining){SetProp("m_iHostagesRemaining", hostagesRemaining.tointeger())}
2151 CBaseEntity["GetHostagesRemaining"] <- function(){return GetProp("m_iHostagesRemaining")}
2152
2153 CBaseEntity["SetMapHasBombTarget"] <- function(mapHasBombTarget){SetProp("m_bMapHasBombTarget", mapHasBombTarget.tointeger())}
2154 CBaseEntity["GetMapHasBombTarget"] <- function(){return GetProp("m_bMapHasBombTarget")}
2155
2156 CBaseEntity["SetMapHasRescueZone"] <- function(mapHasRescueZone){SetProp("m_bMapHasRescueZone", mapHasRescueZone.tointeger())}
2157 CBaseEntity["GetMapHasRescueZone"] <- function(){return GetProp("m_bMapHasRescueZone")}
2158
2159 CBaseEntity["SetLogoMap"] <- function(logoMap){SetProp("m_bLogoMap", logoMap.tointeger())}
2160 CBaseEntity["GetLogoMap"] <- function(){return GetProp("m_bLogoMap")}
2161
2162 CBaseEntity["SetBlackMarket"] <- function(blackMarket){SetProp("m_bBlackMarket", blackMarket.tointeger())}
2163 CBaseEntity["GetBlackMarket"] <- function(){return GetProp("m_bBlackMarket")}
2164
2165
2166 CBaseEntity["SetRagdollOrigin"] <- function(ragdollOrigin){SetProp("m_vecRagdollOrigin", ragdollOrigin)}
2167 CBaseEntity["GetRagdollOrigin"] <- function(){return GetProp("m_vecRagdollOrigin")}
2168
2169 CBaseEntity["SetPlayer"] <- function(player){SetPropEntity("m_hPlayer", player)}
2170 CBaseEntity["GetPlayer"] <- function(){return GetPropEntity("m_hPlayer")}
2171
2172 CBaseEntity["SetRagdollVelocity"] <- function(ragdollVelocity){SetProp("m_vecRagdollVelocity", ragdollVelocity)}
2173 CBaseEntity["GetRagdollVelocity"] <- function(){return GetProp("m_vecRagdollVelocity")}
2174
2175 CBaseEntity["SetDeathPose"] <- function(deathPose){SetProp("m_iDeathPose", deathPose.tointeger())}
2176 CBaseEntity["GetDeathPose"] <- function(){return GetProp("m_iDeathPose")}
2177
2178 CBaseEntity["SetDeathFrame"] <- function(deathFrame){SetProp("m_iDeathFrame", deathFrame.tointeger())}
2179 CBaseEntity["GetDeathFrame"] <- function(){return GetProp("m_iDeathFrame")}
2180
2181 CBaseEntity["SetOnFire"] <- function(onFire){SetProp("m_bOnFire", onFire.tointeger())}
2182 CBaseEntity["IsOnFire"] <- function(){return GetProp("m_bOnFire")}
2183
2184 CBaseEntity["SetInterpOrigin"] <- function(interpOrigin){SetProp("m_bInterpOrigin", interpOrigin.tointeger())}
2185 CBaseEntity["IsInterpOrigin"] <- function(){return GetProp("m_bInterpOrigin")}
2186
2187 CBaseEntity["SetRagdollType"] <- function(ragdollType){SetProp("m_ragdollType", ragdollType.tointeger())}
2188 CBaseEntity["GetRagdollType"] <- function(){return GetProp("m_ragdollType")}
2189
2190 CBaseEntity["SetZombieClass"] <- function(zombieClass){SetProp("m_zombieClass", zombieClass.tointeger())}
2191 CBaseEntity["GetZombieClass"] <- function(){return GetProp("m_zombieClass")}
2192
2193 CBaseEntity["SetSurvivorCharacter"] <- function(survivorCharacter){SetProp("m_survivorCharacter", survivorCharacters.tointeger())}
2194 CBaseEntity["GetSurvivorCharacter"] <- function(){return GetProp("m_survivorCharacter")}
2195
2196
2197 CBaseEntity["SetScore"] <- function(score){SetProp("m_iScore", score.tointeger())}
2198 CBaseEntity["GetScore"] <- function(){return GetProp("m_iScore")}
2199
2200 CBaseEntity["SetRoundsWon"] <- function(roundsWon){SetProp("m_iRoundsWon", roundsWon.tointeger())}
2201 CBaseEntity["GetRoundsWon"] <- function(){return GetProp("m_iRoundsWon")}
2202
2203 CBaseEntity["SetTeamName"] <- function(teamName){SetProp("m_szTeamname", teamName.tostring())}
2204 CBaseEntity["GetTeamName"] <- function(){return GetProp("m_szTeamname")}
2205
2206 CBaseEntity["SetPlayers"] <- function(players){SetProp("player_array", players)}
2207 CBaseEntity["GetPlayers"] <- function(){return GetProp("player_array", null, true)}
2208
2209
2210 CBaseEntity["SetUseHitboxesForRenderBox"] <- function(useHitboxesForRenderBox){SetProp("m_bUseHitboxesForRenderBox", useHitboxesForRenderBox.tointeger())}
2211 CBaseEntity["GetUseHitboxesForRenderBox"] <- function(){return GetProp("m_bUseHitboxesForRenderBox")}
2212
2213 CBaseEntity["SetDefaultAnim"] <- function(value){SetProp("m_iszDefaultAnim", value.tostring())}
2214 CBaseEntity["GetDefaultAnim"] <- function(value){return GetProp("m_iszDefaultAnim")}
2215
2216 CBaseEntity["SetGoalSequence"] <- function(value){SetProp("m_iGoalSequence", value.tointeger())}
2217 CBaseEntity["GetGoalSequence"] <- function(value){return GetProp("m_iGoalSequence")}
2218
2219 CBaseEntity["SetTransitionDirection"] <- function(value){SetProp("m_iTransitionDirection", value.tointeger())}
2220 CBaseEntity["GetTransitionDirection"] <- function(value){return GetProp("m_iTransitionDirection")}
2221
2222 CBaseEntity["SetRandomAnimation"] <- function(value){SetProp("m_bRandomAnimator", value.tointeger())}
2223 CBaseEntity["GetRandomAnimation"] <- function(value){return GetProp("m_bRandomAnimator")}
2224
2225 CBaseEntity["SetNextRandAnim"] <- function(value){SetProp("m_flNextRandAnim", value.tofloat())}
2226 CBaseEntity["GetNextRandAnim"] <- function(value){return GetProp("m_flNextRandAnim")}
2227
2228 CBaseEntity["SetMinRandAnimTime"] <- function(value){SetProp("m_flMinRandAnimTime", value.tofloat())}
2229 CBaseEntity["GetMinRandAnimTime"] <- function(value){return GetProp("m_flMinRandAnimTime")}
2230
2231 CBaseEntity["SetMaxRandAnimTime"] <- function(value){SetProp("m_flMaxRandAnimTime", value.tofloat())}
2232 CBaseEntity["GetMaxRandAnimTime"] <- function(value){return GetProp("m_flMaxRandAnimTime")}
2233
2234 CBaseEntity["SetStartDisabled"] <- function(value){SetProp("m_bStartDisabled", value.tointeger())}
2235 CBaseEntity["GetStartDisabled"] <- function(value){return GetProp("m_bStartDisabled")}
2236
2237 CBaseEntity["SetPendingSequence"] <- function(value){SetProp("m_nPendingSequence", value.tointeger())}
2238 CBaseEntity["GetPendingSequence"] <- function(value){return GetProp("m_nPendingSequence")}
2239
2240 CBaseEntity["SetUpdateAttachedChildren"] <- function(value){SetProp("m_bUpdateAttachedChildren", value.tointeger())}
2241 CBaseEntity["GetUpdateAttachedChildren"] <- function(value){return GetProp("m_bUpdateAttachedChildren")}
2242
2243 CBaseEntity["SetInitialGlowState"] <- function(value){SetProp("m_iInitialGlowState", value.tointeger())}
2244 CBaseEntity["GetInitialGlowState"] <- function(value){return GetProp("m_iInitialGlowState")}
2245
2246
2247 CBaseEntity["SetEntAttached"] <- function(entAttached){SetPropEntity("m_hEntAttached", entAttached)}
2248 CBaseEntity["GetEntAttached"] <- function(){return GetPropEntity("m_hEntAttached")}
2249
2250 CBaseEntity["SetCheapEffect"] <- function(cheapEffect){SetProp("m_bCheapEffect", cheapEffect.tointeger())}
2251 CBaseEntity["IsCheapEffect"] <- function(){return GetProp("m_bCheapEffect")}
2252
2253 CBaseEntity["SetLifetime"] <- function(value){SetProp("m_flLifetime", value.tofloat())}
2254 CBaseEntity["GetLifetime"] <- function(value){return GetProp("m_flLifetime")}
2255
2256 CBaseEntity["SetSize"] <- function(value){SetProp("m_flSize", value.tofloat())}
2257 CBaseEntity["GetSize"] <- function(value){return GetProp("m_flSize")}
2258
2259 CBaseEntity["SetDangerSound"] <- function(value){SetProp("m_iDangerSound", value.tointeger())}
2260 CBaseEntity["GetDangerSound"] <- function(value){return GetProp("m_iDangerSound")}
2261
2262
2263 CBaseEntity["SetFadeStartDist"] <- function(fadeStartDist){SetProp("m_flFadeStartDist", fadeStartDist.tofloat())}
2264 CBaseEntity["GetFadeStartDist"] <- function(){return GetProp("m_flFadeStartDist")}
2265
2266 CBaseEntity["SetFadeEndDist"] <- function(fadeEndDist){SetProp("m_flFadeEndDist", fadeEndDist.tofloat())}
2267 CBaseEntity["GetFadeEndDist"] <- function(){return GetProp("m_flFadeEndDist")}
2268
2269
2270 CBaseEntity["SetDOFEnabled"] <- function(DOFEnabled){SetProp("m_bDOFEnabled", DOFEnabled.tointeger())}
2271 CBaseEntity["IsDOFEnabled"] <- function(){return GetProp("m_bDOFEnabled")}
2272
2273 CBaseEntity["SetNearBlurDepth"] <- function(nearBlurDepth){SetProp("m_flNearBlurDepth", nearBlurDepth.tofloat())}
2274 CBaseEntity["GetNearBlurDepth"] <- function(){return GetProp("m_flNearBlurDepth")}
2275
2276 CBaseEntity["SetFarBlurDepth"] <- function(farBlurDepth){SetProp("m_flFarBlurDepth", farBlurDepth.tofloat())}
2277 CBaseEntity["GetFarBlurDepth"] <- function(){return GetProp("m_flFarBlurDepth")}
2278
2279 CBaseEntity["SetNearFocusDepth"] <- function(nearFocusDepth){SetProp("m_flNearFocusDepth", nearFocusDepth.tofloat())}
2280 CBaseEntity["GetNearFocusDepth"] <- function(){return GetProp("m_flNearFocusDepth")}
2281
2282 CBaseEntity["SetFarFocusDepth"] <- function(farFocusDepth){SetProp("m_flFarFocusDepth", farFocusDepth.tofloat())}
2283 CBaseEntity["GetFarFocusDepth"] <- function(){return GetProp("m_flFarFocusDepth")}
2284
2285 CBaseEntity["SetNearBlurRadius"] <- function(nearBlurRadius){SetProp("m_flNearBlurRadius", nearBlurRadius.tofloat())}
2286 CBaseEntity["GetNearBlurRadius"] <- function(){return GetProp("m_flNearBlurRadius")}
2287
2288 CBaseEntity["SetFarBlurRadius"] <- function(farBlurRadius){SetProp("m_flFarBlurRadius", farBlurRadius.tofloat())}
2289 CBaseEntity["GetFarBlurRadius"] <- function(){return GetProp("m_flFarBlurRadius")}
2290
2291 CBaseEntity["SetBlendEndTime"] <- function(value){SetProp("m_flBlendEndTime", value.tofloat())}
2292 CBaseEntity["GetBlendEndTime"] <- function(value){return GetProp("m_flBlendEndTime")}
2293
2294 CBaseEntity["SetBlendStartTime"] <- function(value){SetProp("m_flBlendStartTime", value.tofloat())}
2295 CBaseEntity["GetBlendStartTime"] <- function(value){return GetProp("m_flBlendStartTime")}
2296
2297
2298 CBaseEntity["SetSpawnRate"] <- function(spawnRate){SetProp("m_SpawnRate", spawnRate.tofloat())}
2299 CBaseEntity["GetSpawnRate"] <- function(){return GetProp("m_SpawnRate")}
2300
2301 CBaseEntity["SetColor"] <- function(color){SetProp("m_Color", color)}
2302 CBaseEntity["GetColor"] <- function(){return GetProp("m_Color")}
2303
2304 CBaseEntity["SetParticleLifetime"] <- function(particleLifetime){SetProp("m_ParticleLifetime", particleLifetime.tofloat())}
2305 CBaseEntity["GetParticleLifetime"] <- function(){return GetProp("m_ParticleLifetime")}
2306
2307 CBaseEntity["SetStopEmitTime"] <- function(stopEmitTime){SetProp("m_StopEmitTime", stopEmitTime.tofloat())}
2308 CBaseEntity["GetStopEmitTime"] <- function(){return GetProp("m_StopEmitTime")}
2309
2310 CBaseEntity["SetMinSpeed"] <- function(minSpeed){SetProp("m_MinSpeed", minSpeed.tofloat())}
2311 CBaseEntity["GetMinSpeed"] <- function(){return GetProp("m_MinSpeed")}
2312
2313 CBaseEntity["SetMaxSpeed"] <- function(maxSpeed){SetProp("m_MaxSpeed", maxSpeed.tofloat())}
2314 CBaseEntity["GetMaxSpeed"] <- function(){return GetProp("m_MaxSpeed")}
2315
2316 CBaseEntity["SetMinDirectedSpeed"] <- function(minDirectedSpeed){SetProp("m_MinDirectedSpeed", minDirectedSpeed.tofloat())}
2317 CBaseEntity["GetMinDirectedSpeed"] <- function(){return GetProp("m_MinDirectedSpeed")}
2318
2319 CBaseEntity["SetMaxDirectedSpeed"] <- function(maxDirectedSpeed){SetProp("m_MaxDirectedSpeed", maxDirectedSpeed.tofloat())}
2320 CBaseEntity["GetMaxDirectedSpeed"] <- function(){return GetProp("m_MaxDirectedSpeed")}
2321
2322 CBaseEntity["SetStartSize"] <- function(startSize){SetProp("m_StartSize", startSize.tofloat())}
2323 CBaseEntity["GetStartSize"] <- function(){return GetProp("m_StartSize")}
2324
2325 CBaseEntity["SetEndSize"] <- function(endSize){SetProp("m_EndSize", endSize.tofloat())}
2326 CBaseEntity["GetEndSize"] <- function(){return GetProp("m_EndSize")}
2327
2328 CBaseEntity["SetSpawnRadius"] <- function(spawnRadius){SetProp("m_SpawnRadius", spawnRadius.tofloat())}
2329 CBaseEntity["GetSpawnRadius"] <- function(){return GetProp("m_SpawnRadius")}
2330
2331 CBaseEntity["SetEmit"] <- function(emit){SetProp("m_bEmit", emit.tointeger())}
2332 CBaseEntity["GetEmit"] <- function(){return GetProp("m_bEmit")}
2333
2334 CBaseEntity["SetOpacity"] <- function(opacity){SetProp("m_Opacity", opacity.tofloat())}
2335 CBaseEntity["GetOpacity"] <- function(){return GetProp("m_Opacity")}
2336
2337 CBaseEntity["SetAttachment"] <- function(value){SetProp("m_nAttachment", value.tointeger())}
2338 CBaseEntity["GetAttachment"] <- function(value){return GetProp("m_nAttachment")}
2339
2340
2341 CBaseEntity["SetDensity"] <- function(density){SetProp("m_nDensity", density.tointeger())}
2342 CBaseEntity["GetDensity"] <- function(){return GetProp("m_nDensity")}
2343
2344 CBaseEntity["SetLifetime"] <- function(lifetime){SetProp("m_nLifetime", lifetime.tointeger())}
2345 CBaseEntity["GetLifetime"] <- function(){return GetProp("m_nLifetime")}
2346
2347 CBaseEntity["SetSpeed"] <- function(speed){SetProp("m_nSpeed", speed.tointeger())}
2348 CBaseEntity["GetSpeed"] <- function(){return GetProp("m_nSpeed")}
2349
2350 CBaseEntity["SetEmit"] <- function(emit){SetProp("m_bEmit", emit.tointeger())}
2351 CBaseEntity["GetEmit"] <- function(){return GetProp("m_bEmit")}
2352
2353
2354 CBaseEntity["SetStartTime"] <- function(startTime){SetProp("m_flStartTime", startTime.tofloat())}
2355 CBaseEntity["GetStartTime"] <- function(){return GetProp("m_flStartTime")}
2356
2357 CBaseEntity["SetFadeInStart"] <- function(fadeInStart){SetProp("m_flFadeInStart", fadeInStart.tofloat())}
2358 CBaseEntity["GetFadeInStart"] <- function(){return GetProp("m_flFadeInStart")}
2359
2360 CBaseEntity["SetFadeInLength"] <- function(fadeInLength){SetProp("m_flFadeInLength", fadeInLength.tofloat())}
2361 CBaseEntity["GetFadeInLength"] <- function(){return GetProp("m_flFadeInLength")}
2362
2363 CBaseEntity["SetFadeOutStart"] <- function(fadeOutStart){SetProp("m_flFadeOutStart", fadeOutStart.tofloat())}
2364 CBaseEntity["GetFadeOutStart"] <- function(){return GetProp("m_flFadeOutStart")}
2365
2366 CBaseEntity["SetFadeOutLength"] <- function(fadeOutLength){SetProp("m_flFadeOutLength", fadeOutLength.tofloat())}
2367 CBaseEntity["GetFadeOutLength"] <- function(){return GetProp("m_flFadeOutLength")}
2368
2369 CBaseEntity["SetFadeOutModelStart"] <- function(fadeOutModelStart){SetProp("m_flFadeOutModelStart", fadeOutModelStart.tofloat())}
2370 CBaseEntity["GetFadeOutModelStart"] <- function(){return GetProp("m_flFadeOutModelStart")}
2371
2372 CBaseEntity["SetFadeOutModelLength"] <- function(fadeOutModelLength){SetProp("m_flFadeOutModelLength", fadeOutModelLength.tofloat())}
2373 CBaseEntity["GetFadeOutModelLength"] <- function(){return GetProp("m_flFadeOutModelLength")}
2374
2375 CBaseEntity["SetDissolveType"] <- function(dissolveType){SetProp("m_nDissolveType", dissolveType.tointeger())}
2376 CBaseEntity["GetDissolveType"] <- function(){return GetProp("m_nDissolveType")}
2377
2378 CBaseEntity["SetDissolverOrigin"] <- function(dissolverOrigin){SetProp("m_vDissolverOrigin", dissolverOrigin)}
2379 CBaseEntity["GetDissolverOrigin"] <- function(){return GetProp("m_vDissolverOrigin")}
2380
2381 CBaseEntity["SetMagnitude"] <- function(magnitude){SetProp("m_nMagnitude", magnitude.tointeger())}
2382 CBaseEntity["GetMagnitude"] <- function(){return GetProp("m_nMagnitude")}
2383
2384
2385 CBaseEntity["SetAttachment"] <- function(attachment){SetProp("m_nAttachment", attachment.tointeger())}
2386 CBaseEntity["GetAttachment"] <- function(){return GetProp("m_nAttachment")}
2387
2388 CBaseEntity["SetLifetime"] <- function(lifetime){SetProp("m_flLifetime", lifetime.tofloat())}
2389 CBaseEntity["GetLifetime"] <- function(){return GetProp("m_flLifetime")}
2390
2391
2392 CBaseEntity["SetEnabled"] <- function(enable){SetProp("m_fog.enable", enable.tointeger())}
2393 CBaseEntity["IsEnabled"] <- function(){GetProp("m_fog.enable")}
2394
2395 CBaseEntity["SetBlend"] <- function(blend){SetProp("m_fog.blend", blend.tointeger())}
2396 CBaseEntity["IsBlend"] <- function(){return GetProp("m_fog.blend")}
2397
2398 CBaseEntity["SetDirPrimary"] <- function(dirPrimary){SetProp("m_fog.dirPrimary", dirPrimary)}
2399 CBaseEntity["GetDirPrimary"] <- function(){return GetProp("m_fog.dirPrimary")}
2400
2401 CBaseEntity["SetColorPrimary"] <- function(colorPrimary){SetProp("m_fog.colorPrimary", colorPrimary.tointeger())}
2402 CBaseEntity["GetColorPrimary"] <- function(){return GetProp("m_fog.colorPrimary")}
2403
2404 CBaseEntity["SetColorSecondary"] <- function(colorSecondary){SetProp("m_fog.colorSecondary", colorSecondary.tointeger())}
2405 CBaseEntity["GetColorSecondary"] <- function(){return GetProp("m_fog.colorSecondary")}
2406
2407 CBaseEntity["SetStart"] <- function(start){SetProp("m_fog.start", start.tofloat())}
2408 CBaseEntity["GetStart"] <- function(){return GetProp("m_fog.start")}
2409
2410 CBaseEntity["SetEnd"] <- function(end){SetProp("m_fog.end", end.tofloat())}
2411 CBaseEntity["GetEnd"] <- function(){return GetProp("m_fog.end")}
2412
2413 CBaseEntity["SetMaxDensity"] <- function(maxDensity){SetProp("m_fog.maxdensity", maxDensity.tofloat())}
2414 CBaseEntity["GetMaxDensity"] <- function(){return GetProp("m_fog.maxdensity")}
2415
2416 CBaseEntity["SetFarZ"] <- function(farZ){SetProp("m_fog.farz", farZ.tofloat())}
2417 CBaseEntity["GetFarZ"] <- function(){return GetProp("m_fog.farz")}
2418
2419 CBaseEntity["SetSkyboxFogFactor"] <- function(skyboxFogFactor){SetProp("m_fog.skyboxFogFactor", skyboxFogFactor.tofloat())}
2420 CBaseEntity["GetSkyboxFogFactor"] <- function(){return GetProp("m_fog.skyboxFogFactor")}
2421
2422 CBaseEntity["SetColorPrimaryLerpTo"] <- function(colorPrimaryLerpTo){SetProp("m_fog.colorPrimaryLerpTo", colorPrimaryLerpTo.tointeger())}
2423 CBaseEntity["GetColorPrimaryLerpTo"] <- function(){return GetProp("m_fog.colorPrimaryLerpTo")}
2424
2425 CBaseEntity["SetColorSecondaryLerpTo"] <- function(colorSecondaryLerpTo){SetProp("m_fog.colorSecondaryLerpTo", colorSecondaryLerpTo.tointeger())}
2426 CBaseEntity["GetColorSecondaryLerpTo"] <- function(){return GetProp("m_fog.colorSecondaryLerpTo")}
2427
2428 CBaseEntity["SetStartLerpTo"] <- function(startLerpTo){SetProp("m_fog.startLerpTo", startLerpTo.tofloat())}
2429 CBaseEntity["GetStartLerpTo"] <- function(){return GetProp("m_fog.startLerpTo")}
2430
2431 CBaseEntity["SetEndLerpTo"] <- function(endLerpTo){SetProp("m_fog.endLerpTo", endLerpTo.tofloat())}
2432 CBaseEntity["GetEndLerpTo"] <- function(){return GetProp("m_fog.endLerpTo")}
2433
2434 CBaseEntity["SetMaxDensityLerpTo"] <- function(maxDensityLerpTo){SetProp("m_fog.maxdensityLerpTo", maxDensityLerpTo.tofloat())}
2435 CBaseEntity["GetMaxDensityLerpTo"] <- function(){return GetProp("m_fog.maxdensityLerpTo")}
2436
2437 CBaseEntity["SetSkyboxFogFactorLerpTo"] <- function(skyboxFogFactorLerpTo){SetProp("m_fog.skyboxFogFactorLerpTo", skyboxFogFactorLerpTo.tofloat())}
2438 CBaseEntity["GetSkyboxFogFactorLerpTo"] <- function(){return GetProp("m_fog.skyboxFogFactorLerpTo")}
2439
2440 CBaseEntity["SetLerpTime"] <- function(lerpTime){SetProp("m_fog.lerptime", lerpTime.tofloat())}
2441 CBaseEntity["GetLerpTime"] <- function(){return GetProp("m_fog.lerptime")}
2442
2443 CBaseEntity["SetDuration"] <- function(duration){SetProp("m_fog.duration", duration.tofloat())}
2444 CBaseEntity["GetDuration"] <- function(){return GetProp("m_fog.duration")}
2445
2446 CBaseEntity["SetHDRColorScale"] <- function(HDRColorScale){SetProp("m_fog.HDRColorScale", HDRColorScale.tofloat())}
2447 CBaseEntity["GetHDRColorScale"] <- function(){return GetProp("m_fog.HDRColorScale")}
2448
2449 CBaseEntity["SetUseAngles"] <- function(value){SetProp("m_bUseAngles", value.tointeger())}
2450 CBaseEntity["GetUseAngles"] <- function(value){return GetProp("m_bUseAngles")}
2451
2452
2453 CBaseEntity["SetHorizontalSize"] <- function(horizontalSize){SetProp("m_nHorizontalSize", horizontalSize.tointeger())}
2454 CBaseEntity["GetHorizontalSize"] <- function(){return GetProp("m_nHorizontalSize")}
2455
2456 CBaseEntity["SetVerticalSize"] <- function(verticalSize){SetProp("m_nVerticalSize", verticalSize.tointeger())}
2457 CBaseEntity["GetVerticalSize"] <- function(){return GetProp("m_nVerticalSize")}
2458
2459 CBaseEntity["SetMinDist"] <- function(minDist){SetProp("m_nMinDist", minDist.tointeger())}
2460 CBaseEntity["GetMinDist"] <- function(){return GetProp("m_nMinDist")}
2461
2462 CBaseEntity["SetMaxDist"] <- function(maxDist){SetProp("m_nMaxDist", maxDist.tointeger())}
2463 CBaseEntity["GetMaxDist"] <- function(){return GetProp("m_nMaxDist")}
2464
2465 CBaseEntity["SetOuterMaxDist"] <- function(outerMaxDist){SetProp("m_nOuterMaxDist", outerMaxDist.tointeger())}
2466 CBaseEntity["GetOuterMaxDist"] <- function(){return GetProp("m_nOuterMaxDist")}
2467
2468 CBaseEntity["SetGlowProxySize"] <- function(glowProxySize){SetProp("m_flGlowProxySize", glowProxySize.tofloat())}
2469 CBaseEntity["GetGlowProxySize"] <- function(){return GetProp("m_flGlowProxySize")}
2470
2471 CBaseEntity["SetHDRColorScale"] <- function(HDRColorScale){SetProp("HDRColorScale", HDRColorScale.tofloat())}
2472 CBaseEntity["GetHDRColorScale"] <- function(){return GetProp("HDRColorScale")}
2473
2474
2475 CBaseEntity["SetDisplayPerf"] <- function(displayPerf){SetProp("m_bDisplayPerf", displayPerf.tointeger())}
2476 CBaseEntity["GetDisplayPerf"] <- function(){return GetProp("m_bDisplayPerf")}
2477
2478 CBaseEntity["SetMeasurePerf"] <- function(measurePerf){SetProp("m_bMeasurePerf", measurePerf.tointeger())}
2479 CBaseEntity["GetMeasurePerf"] <- function(){return GetProp("m_bMeasurePerf")}
2480
2481
2482 CBaseEntity["SetMaterialName"] <- function(materialName){SetProp("m_iMaterialName", materialName.tointeger())}
2483 CBaseEntity["GetMaterialName"] <- function(){return GetProp("m_iMaterialName")}
2484
2485 CBaseEntity["SetLifetime"] <- function(lifetime){SetProp("m_Info.m_flLifetime", lifetime.tofloat())}
2486 CBaseEntity["GetLifetime"] <- function(){return GetProp("m_flLifetime")}
2487
2488 CBaseEntity["SetStartSize"] <- function(startSize){SetProp("m_Info.m_flStartSize", startSize.tofloat())}
2489 CBaseEntity["GetStartSize"] <- function(){return GetProp("m_flStartSize")}
2490
2491 CBaseEntity["SetEndSize"] <- function(endSize){SetProp("m_flEndSize", endSize.tofloat())}
2492 CBaseEntity["GetEndSize"] <- function(){return GetProp("m_flEndSize")}
2493
2494 CBaseEntity["SetConstraintEntity"] <- function(constraintEntity){SetPropEntity("m_hConstraintEntity", constraintEntity)}
2495 CBaseEntity["GetConstraintEntity"] <- function(){return GetProp("m_hConstraintEntity")}
2496
2497
2498 CBaseEntity["SetOrigin"] <- function(origin){SetProp("m_vOrigin", origin)}
2499 CBaseEntity["GetOrigin"] <- function(){return GetProp("m_vOrigin")}
2500
2501 CBaseEntity["SetDirection"] <- function(direction){SetProp("m_vDirection", direction)}
2502 CBaseEntity["GetDirection"] <- function(){return GetProp("m_vDirection")}
2503
2504
2505 CBaseEntity["SetSequenceScale"] <- function(sequenceScale){SetProp("m_flSequenceScale", sequenceScale.tofloat())}
2506 CBaseEntity["GetSequenceScale"] <- function(){return GetProp("m_flSequenceScale")}
2507
2508
2509 CBaseEntity["SetSpawnTime"] <- function(spawnTime){SetProp("m_flSpawnTime", spawnTime.tofloat())}
2510 CBaseEntity["GetSpawnTime"] <- function(){return GetProp("m_flSpawnTime")}
2511
2512 CBaseEntity["SetFadeStartTime"] <- function(fadeStartTime){SetProp("m_FadeStartTime", fadeStartTime.tofloat())}
2513 CBaseEntity["GetFadeStartTime"] <- function(){return GetProp("m_FadeStartTime")}
2514
2515 CBaseEntity["SetFadeEndTime"] <- function(fadeEndTime){SetProp("m_FadeEndTime", fadeEndTime.tofloat())}
2516 CBaseEntity["GetFadeEndTime"] <- function(){return GetProp("m_FadeEndTime")}
2517
2518 CBaseEntity["SetCurrentStage"] <- function(currentStage){SetProp("m_CurrentStage", currentStage.tointeger())}
2519 CBaseEntity["GetCurrentStage"] <- function(){return GetProp("m_CurrentStage")}
2520
2521
2522 CBaseEntity["SetMins"] <- function(mins){SetProp("m_vMins", mins)}
2523 CBaseEntity["GetMins"] <- function(){return GetProp("m_vMins")}
2524
2525 CBaseEntity["SetMaxs"] <- function(maxs){SetProp("m_vMaxs", maxs)}
2526 CBaseEntity["GetMaxs"] <- function(){return GetProp("m_vMaxs")}
2527
2528 CBaseEntity["SetBlocked"] <- function(blocked){SetProp("m_bBlocked", blocked.tointeger())}
2529 CBaseEntity["IsBlocked"] <- function(){return GetProp("m_bBlocked")}
2530
2531 CBaseEntity["SetBlockType"] <- function(blockType){SetProp("m_nBlockType", blockType.tointeger())}
2532 CBaseEntity["GetBlockType"] <- function(){return GetProp("m_nBlockType")}
2533
2534
2535 CBaseEntity["SetTargetEntity"] <- function(targetEntity){SetPropEntity("m_hTargetEntity", targetEntity)}
2536 CBaseEntity["GetTargetEntity"] <- function(){return GetPropEntity("m_hTargetEntity")}
2537
2538 CBaseEntity["SetState"] <- function(state){SetProp("m_bState", state.tointeger())}
2539 CBaseEntity["GetState"] <- function(){return GetProp("m_bState")}
2540
2541 CBaseEntity["SetLightFOV"] <- function(lightFOV){SetProp("m_flLightFOV", lightFOV.tofloat())}
2542 CBaseEntity["GetLightFOV"] <- function(){return GetProp("m_flLightFOV")}
2543
2544 CBaseEntity["SetEnableShadows"] <- function(enableShadows){SetProp("m_bEnableShadows", enableShadows.tointeger())}
2545 CBaseEntity["GetEnableShadows"] <- function(){return GetProp("m_bEnableShadows")}
2546
2547 CBaseEntity["SetLightOnlyTarget"] <- function(lightOnlyTarget){SetProp("m_bLightOnlyTarget", lightOnlyTarget.tointeger())}
2548 CBaseEntity["GetLightOnlyTarget"] <- function(){return GetProp("m_bLightOnlyTarget")}
2549
2550 CBaseEntity["SetLightWorld"] <- function(lightWorld){SetProp("m_bLightWorld", lightWorld.tointeger())}
2551 CBaseEntity["GetLightWorld"] <- function(){return GetProp("m_bLightWorld")}
2552
2553 CBaseEntity["SetCameraSpace"] <- function(cameraSpace){SetProp("m_bCameraSpace", cameraSpace.tointeger())}
2554 CBaseEntity["GetCameraSpace"] <- function(){return GetProp("m_bCameraSpace")}
2555
2556 CBaseEntity["SetLinearFloatLightColor"] <- function(linearFloatLightColor){SetProp("m_LinearFloatLightColor", linearFloatLightColor)}
2557 CBaseEntity["GetLinearFloatLightColor"] <- function(){return GetProp("m_LinearFloatLightColor")}
2558
2559 CBaseEntity["SetAmbient"] <- function(ambient){SetProp("m_flAmbient", ambient.tofloat())}
2560 CBaseEntity["GetAmbient"] <- function(){return GetProp("m_flAmbient")}
2561
2562 CBaseEntity["SetSpotlightTextureName"] <- function(spotlightTextureName){SetProp("m_SpotlightTextureName", spotlightTextureName.tostring())}
2563 CBaseEntity["GetSpotlightTextureName"] <- function(){return GetProp("m_SpotlightTextureName")}
2564
2565 CBaseEntity["SetSpotlightTextureFrame"] <- function(spotlightTextureFrame){SetProp("m_nSpotlightTextureFrame", spotlightTextureFrame.tointeger())}
2566 CBaseEntity["GetSpotlightTextureFrame"] <- function(){return GetProp("m_nSpotlightTextureFrame")}
2567
2568 CBaseEntity["SetNearZ"] <- function(nearZ){SetProp("m_flNearZ", nearZ.tofloat())}
2569 CBaseEntity["GetNearZ"] <- function(){return GetProp("m_flNearZ")}
2570
2571 CBaseEntity["SetFarZ"] <- function(farZ){SetProp("m_flFarZ", farZ.tofloat())}
2572 CBaseEntity["GetFarZ"] <- function(){return GetProp("m_flFarZ")}
2573
2574 CBaseEntity["SetShadowQuality"] <- function(shadowQuality){SetProp("m_nShadowQuality", shadowQuality.tointeger())}
2575 CBaseEntity["GetShadowQuality"] <- function(){return GetProp("m_nShadowQuality")}
2576
2577
2578 CBaseEntity["SetTargetPosition"] <- function(targetPosition){SetProp("m_targetPosition", targetPosition)}
2579 CBaseEntity["GetTargetPosition"] <- function(){return GetProp("m_targetPosition")}
2580
2581 CBaseEntity["SetControlPosition"] <- function(controlPosition){SetProp("m_controlPosition", controlPosition)}
2582 CBaseEntity["GetControlPosition"] <- function(){return GetProp("m_controlPosition")}
2583
2584 CBaseEntity["SetScrollRate"] <- function(scrollRate){SetProp("m_scrollRate", scrollRate.tofloat())}
2585 CBaseEntity["GetScrollRate"] <- function(){return GetProp("m_scrollRate")}
2586
2587 CBaseEntity["SetWidth"] <- function(width){SetProp("m_flWidth", width.tofloat())}
2588 CBaseEntity["GetWidth"] <- function(){return GetProp("m_flWidth")}
2589
2590
2591 CBaseEntity["SetSpawnRate"] <- function(spawnRate){SetProp("m_SpawnRate", spawnRate.tofloat())}
2592 CBaseEntity["GetSpawnRate"] <- function(){GetProp("m_SpawnRate")}
2593
2594 CBaseEntity["SetStartColor"] <- function(startColor){SetProp("m_StartColor", startColor)}
2595 CBaseEntity["GetStartColor"] <- function(){return GetProp("m_StartColor")}
2596
2597 CBaseEntity["SetEndColor"] <- function(endColor){SetProp("m_EndColor", endColor)}
2598 CBaseEntity["GetEndColor"] <- function(){return GetProp("m_EndColor")}
2599
2600 CBaseEntity["SetParticleLifetime"] <- function(particleLifetime){SetProp("m_ParticleLifetime", particleLifetime.tofloat())}
2601 CBaseEntity["GetParticleLifetime"] <- function(){return GetProp("m_ParticleLifetime")}
2602
2603 CBaseEntity["SetStopEmitTime"] <- function(stopEmitTime){SetProp("m_StopEmitTime", stopEmitTime.tofloat())}
2604 CBaseEntity["GetStopEmitTime"] <- function(){return GetProp("m_StopEmitTime")}
2605
2606 CBaseEntity["SetMinSpeed"] <- function(minSpeed){SetProp("m_MinSpeed", minSpeed.tofloat())}
2607 CBaseEntity["GetMinSpeed"] <- function(){return GetProp("m_MinSpeed")}
2608
2609 CBaseEntity["SetMaxSpeed"] <- function(maxSpeed){SetProp("m_MaxSpeed", maxSpeed.tofloat())}
2610 CBaseEntity["GetMaxSpeed"] <- function(){return GetProp("m_MaxSpeed")}
2611
2612 CBaseEntity["SetStartSize"] <- function(startSize){SetProp("m_StartSize", startSize.tofloat())}
2613 CBaseEntity["GetStartSize"] <- function(){return GetProp("m_StartSize")}
2614
2615 CBaseEntity["SetEndSize"] <- function(endSize){SetProp("m_EndSize", endSize.tofloat())}
2616 CBaseEntity["GetEndSize"] <- function(){return GetProp("m_EndSize")}
2617
2618 CBaseEntity["SetSpawnRadius"] <- function(spawnRadius){SetProp("m_SpawnRadius", spawnRadius.tofloat())}
2619 CBaseEntity["GetSpawnRadius"] <- function(){return GetProp("m_SpawnRadius")}
2620
2621 CBaseEntity["SetEmit"] <- function(emit){SetProp("m_bEmit", emit.tointeger())}
2622 CBaseEntity["GetEmit"] <- function(){return GetProp("m_bEmit")}
2623
2624 CBaseEntity["SetAttachment"] <- function(attachment){SetProp("m_nAttachment", attachment.tointeger())}
2625 CBaseEntity["GetAttachment"] <- function(){return GetProp("m_nAttachment")}
2626
2627 CBaseEntity["SetOpacity"] <- function(opacity){SetProp("m_Opacity", opacity.tofloat())}
2628 CBaseEntity["GetOpacity"] <- function(){return GetProp("m_Opacity")}
2629
2630 CBaseEntity["SetDamaged"] <- function(damaged){SetProp("m_bDamaged", damaged.tointeger())}
2631 CBaseEntity["IsDamaged"] <- function(){return GetProp("m_bDamaged")}
2632
2633 CBaseEntity["SetFlareScale"] <- function(flareScale){SetProp("m_flFlareScale", flareScale.tofloat())}
2634 CBaseEntity["GetFlareScale"] <- function(){return GetProp("m_flFlareScale")}
2635
2636
2637 CBaseEntity["SetDuration"] <- function(duration){SetProp("m_flDuration", duration.tofloat())}
2638 CBaseEntity["GetDuration"] <- function(){return GetProp("m_flDuration")}
2639
2640 CBaseEntity["SetType"] <- function(type){SetProp("m_nType", type.tointeger())}
2641 CBaseEntity["GetType"] <- function(){return GetProp("m_nType")}
2642
2643
2644 CBaseEntity["SetOverlayNames"] <- function(overlayNames){SetProp("m_iszOverlayNames", overlayNames)}
2645 CBaseEntity["GetOverlayNames"] <- function(){return GetProp("m_iszOverlayNames", null, true)}
2646
2647 CBaseEntity["SetOverlayTimes"] <- function(overlayTimes){SetProp("m_flOverlayTimes", overlayTimes)}
2648 CBaseEntity["GetOverlayTimes"] <- function(){return GetProp("m_flOverlayTimes", null, true)}
2649
2650 CBaseEntity["SetStartTime"] <- function(startTime){SetProp("m_flStartTime", startTime.tofloat())}
2651 CBaseEntity["GetStartTime"] <- function(){return GetProp("m_flStartTime")}
2652
2653 CBaseEntity["SetDesiredOverlay"] <- function(desiredOverlay){SetProp("m_iDesiredOverlay", desiredOverlay.tointeger())}
2654 CBaseEntity["GetDesiredOverlay"] <- function(){return GetProp("m_iDesiredOverlay")}
2655
2656 CBaseEntity["SetActive"] <- function(active){SetProp("m_bIsActive", active)}
2657 CBaseEntity["IsActive"] <- function(){return GetProp("m_bIsActive")}
2658
2659
2660 CBaseEntity["SetSpreadSpeed"] <- function(value){SetProp("m_SpreadSpeed", value.tofloat())}
2661 CBaseEntity["GetSpreadSpeed"] <- function(value){return GetProp("m_SpreadSpeed")}
2662
2663 CBaseEntity["SetSpeed"] <- function(value){SetProp("m_Speed", value.tofloat())}
2664 CBaseEntity["GetSpeed"] <- function(value){return GetProp("m_Speed")}
2665
2666 CBaseEntity["SetStartSize"] <- function(value){SetProp("m_StartSize", value.tofloat())}
2667 CBaseEntity["GetStartSize"] <- function(value){return GetProp("m_StartSize")}
2668
2669 CBaseEntity["SetEndSize"] <- function(value){SetProp("m_EndSize", value.tofloat())}
2670 CBaseEntity["GetEndSize"] <- function(value){return GetProp("m_EndSize")}
2671
2672 CBaseEntity["SetRate"] <- function(value){SetProp("m_Rate", value.tofloat())}
2673 CBaseEntity["GetRate"] <- function(value){return GetProp("m_Rate")}
2674
2675 CBaseEntity["SetJetLength"] <- function(value){SetProp("m_JetLength", value.tofloat())}
2676 CBaseEntity["GetJetLength"] <- function(value){return GetProp("m_JetLength")}
2677
2678 CBaseEntity["SetEmit"] <- function(value){SetProp("m_bEmit", value.tointeger())}
2679 CBaseEntity["GetEmit"] <- function(value){return GetProp("m_bEmit")}
2680
2681 CBaseEntity["SetBaseSpread"] <- function(value){SetProp("m_flBaseSpread", value.tofloat())}
2682 CBaseEntity["GetBaseSpread"] <- function(value){return GetProp("m_flBaseSpread")}
2683
2684 CBaseEntity["SetDirLightPos"] <- function(value){SetProp("m_DirLight.m_vPos", value)}
2685 CBaseEntity["GetDirLightPos"] <- function(){return GetProp("m_DirLight.m_vPos")}
2686
2687 CBaseEntity["SetDirLightColor"] <- function(value){SetProp("m_DirLight.m_vColor", value)}
2688 CBaseEntity["GetDirLightColor"] <- function(){return GetProp("m_DirLight.m_vColor")}
2689
2690 CBaseEntity["SetDirLightIntensity"] <- function(value){SetProp("m_DirLight.m_flIntensity", value.tofloat())}
2691 CBaseEntity["GetDirLightIntensity"] <- function(){return GetProp("m_DirLight.m_flIntensity")}
2692
2693 CBaseEntity["SetAmbientLightPos"] <- function(value){SetProp("m_AmbientLight.m_vPos", value)}
2694 CBaseEntity["GetAmbientLightPos"] <- function(){return GetProp("m_AmbientLight.m_vPos")}
2695
2696 CBaseEntity["SetAmbientLightColor"] <- function(value){SetProp("m_AmbientLight.m_vColor", value)}
2697 CBaseEntity["GetAmbientLightColor"] <- function(value){return GetProp("m_AmbientLight.m_vColor")}
2698
2699 CBaseEntity["SetAmbientLightIntensity"] <- function(value){SetProp("m_AmbientLight.m_flIntensity", value.tofloat())}
2700 CBaseEntity["GetAmbientLightIntensity"] <- function(value){return GetProp("m_AmbientLight.m_flIntensity")}
2701
2702 CBaseEntity["SetWind"] <- function(value){SetProp("m_vWind", value)}
2703 CBaseEntity["GetWind"] <- function(value){return GetProp("m_vWind")}
2704
2705 CBaseEntity["SetTwist"] <- function(value){SetProp("m_flTwist", value.tofloat())}
2706 CBaseEntity["GetTwist"] <- function(value){return GetProp("m_flTwist")}
2707
2708 CBaseEntity["SetMaterialModel"] <- function(value){SetProp("m_strMaterialModel", value.tostring())}
2709 CBaseEntity["GetMaterialModel"] <- function(value){return GetProp("m_strMaterialModel")}
2710
2711 CBaseEntity["SetInitialState"] <- function(value){SetProp("m_InitialState", value.tointeger())}
2712 CBaseEntity["GetInitialState"] <- function(value){return GetProp("m_InitialState")}
2713
2714 CBaseEntity["SetRollSpeed"] <- function(value){SetProp("m_flRollSpeed", value.tofloat())}
2715 CBaseEntity["GetRollSpeed"] <- function(value){return GetProp("m_flRollSpeed")}
2716
2717 CBaseEntity["SetWindAngle"] <- function(value){SetProp("m_WindAngle", value)}
2718 CBaseEntity["GetWindAngle"] <- function(value){return GetProp("m_WindAngle")}
2719
2720 CBaseEntity["SetWindSpeed"] <- function(value){SetProp("m_WindSpeed", value.tofloat())}
2721 CBaseEntity["GetWindSpeed"] <- function(value){return GetProp("m_WindSpeed")}
2722
2723
2724 CBaseEntity["SetSpawnRate"] <- function(value){SetProp("m_SpawnRate", value.tofloat())}
2725 CBaseEntity["GetSpawnRate"] <- function(value){return GetProp("m_SpawnRate")}
2726
2727 CBaseEntity["SetStartColor"] <- function(value){SetProp("m_StartColor", value)}
2728 CBaseEntity["GetStartColor"] <- function(value){return GetProp("m_StartColor")}
2729
2730 CBaseEntity["SetEndColor"] <- function(value){SetProp("m_EndColor", value)}
2731 CBaseEntity["GetEndColor"] <- function(value){return GetProp("m_EndColor")}
2732
2733 CBaseEntity["SetParticleLifetime"] <- function(value){SetProp("m_ParticleLifetime", value.tofloat())}
2734 CBaseEntity["GetParticleLifetime"] <- function(value){return GetProp("m_ParticleLifetime")}
2735
2736 CBaseEntity["SetStopEmitTime"] <- function(value){SetProp("m_StopEmitTime", value.tofloat())}
2737 CBaseEntity["GetStopEmitTime"] <- function(value){return GetProp("m_StopEmitTime")}
2738
2739 CBaseEntity["SetMinSpeed"] <- function(value){SetProp("m_MinSpeed", value.tofloat())}
2740 CBaseEntity["GetMinSpeed"] <- function(value){return GetProp("m_MinSpeed")}
2741
2742 CBaseEntity["SetMaxSpeed"] <- function(value){SetProp("m_MaxSpeed", value.tofloat())}
2743 CBaseEntity["GetMaxSpeed"] <- function(value){return GetProp("m_MaxSpeed")}
2744
2745 CBaseEntity["SetMinDirectedSpeed"] <- function(value){SetProp("m_MinDirectedSpeed", value.tofloat())}
2746 CBaseEntity["GetMinDirectedSpeed"] <- function(value){return GetProp("m_MinDirectedSpeed")}
2747
2748 CBaseEntity["SetMaxDirectedSpeed"] <- function(value){SetProp("m_MaxDirectedSpeed", value.tofloat())}
2749 CBaseEntity["etMaxDirectedSpeed"] <- function(value){return GetProp("m_MaxDirectedSpeed")}
2750
2751 CBaseEntity["SetStartSize"] <- function(value){SetProp("m_StartSize", value.tofloat())}
2752 CBaseEntity["GetStartSize"] <- function(value){return GetProp("m_StartSize")}
2753
2754 CBaseEntity["SetEndSize"] <- function(value){SetProp("m_EndSize", value.tofloat())}
2755 CBaseEntity["GetEndSize"] <- function(value){return GetProp("m_EndSize")}
2756
2757 CBaseEntity["SetSpawnRadius"] <- function(value){SetProp("m_SpawnRadius", value.tofloat())}
2758 CBaseEntity["GetSpawnRadius"] <- function(value){return GetProp("m_SpawnRadius")}
2759
2760 CBaseEntity["SetEmit"] <- function(value){SetProp("m_bEmit", value.tointeger())}
2761 CBaseEntity["GetEmit"] <- function(value){return GetProp("m_bEmit")}
2762
2763 CBaseEntity["SetAttachment"] <- function(value){SetProp("m_nAttachment", value.tointeger())}
2764 CBaseEntity["GetAttachment"] <- function(value){return GetProp("m_nAttachment")}
2765
2766 CBaseEntity["SetOpacity"] <- function(value){SetProp("m_Opacity", value.tofloat())}
2767 CBaseEntity["GetOpacity"] <- function(value){return GetProp("m_Opacity")}
2768
2769
2770 CBaseEntity["SetSpawnRate"] <- function(value){SetProp("m_flSpawnRate", value.tofloat())}
2771 CBaseEntity["GetSpawnRate"] <- function(value){return GetProp("m_flSpawnRate")}
2772
2773 CBaseEntity["SetParticleLifetime"] <- function(value){SetProp("m_flParticleLifetime", value.tofloat())}
2774 CBaseEntity["GetParticleLifetime"] <- function(value){return GetProp("m_flParticleLifetime")}
2775
2776 CBaseEntity["SetStartSize"] <- function(value){SetProp("m_flStartSize", value.tofloat())}
2777 CBaseEntity["GetStartSize"] <- function(value){return GetProp("m_flStartSize")}
2778
2779 CBaseEntity["SetEndSize"] <- function(value){SetProp("m_flEndSize", value.tofloat())}
2780 CBaseEntity["GetEndSize"] <- function(value){return GetProp("m_flEndSize")}
2781
2782 CBaseEntity["SetSpawnRadius"] <- function(value){SetProp("m_flSpawnRadius", value.tofloat())}
2783 CBaseEntity["GetSpawnRadius"] <- function(value){return GetProp("m_flSpawnRadius")}
2784
2785 CBaseEntity["SetEmit"] <- function(value){SetProp("m_bEmit", value.tointeger())}
2786 CBaseEntity["GetEmit"] <- function(value){return GetProp("m_bEmit")}
2787
2788 CBaseEntity["SetDontRemove"] <- function(value){SetProp("m_bDontRemove", value.tointeger())}
2789 CBaseEntity["GetDontRemove"] <- function(value){return GetProp("m_bDontRemove")}
2790
2791 CBaseEntity["SetDisabled"] <- function(value){SetProp("m_bDisabled", value.tointeger())}
2792 CBaseEntity["GetDisabled"] <- function(value){return GetProp("m_bDisabled")}
2793
2794
2795 CBaseEntity["SetSpawnRate"] <- function(value){SetProp("m_flSpawnRate", value.tofloat())}
2796 CBaseEntity["GetSpawnRate"] <- function(value){return GetProp("m_flSpawnRate")}
2797
2798 CBaseEntity["SetEndColor"] <- function(value){SetProp("m_vecEndColor", value)}
2799 CBaseEntity["GetEndColor"] <- function(value){return GetProp("m_vecEndColor")}
2800
2801 CBaseEntity["SetParticleLifetime"] <- function(value){SetProp("m_flParticleLifetime", value.tofloat())}
2802 CBaseEntity["GetParticleLifetime"] <- function(value){return GetProp("m_flParticleLifetime")}
2803
2804 CBaseEntity["SetStartSize"] <- function(value){SetProp("m_flStartSize", value.tofloat())}
2805 CBaseEntity["GetStartSize"] <- function(value){return GetProp("m_flStartSize")}
2806
2807 CBaseEntity["SetEndSize"] <- function(value){SetProp("m_flEndSize", value.tofloat())}
2808 CBaseEntity["GetEndSize"] <- function(value){return GetProp("m_flEndSize")}
2809
2810 CBaseEntity["SetSpawnRadius"] <- function(value){SetProp("m_flSpawnRadius", value.tofloat())}
2811 CBaseEntity["GetSpawnRadius"] <- function(value){return GetProp("m_flSpawnRadius")}
2812
2813 CBaseEntity["SetEmit"] <- function(value){SetProp("m_bEmit", value.tointeger())}
2814 CBaseEntity["GetEmit"] <- function(value){return GetProp("m_bEmit")}
2815
2816
2817 CBaseEntity["SetAttachedToEntity"] <- function(value){SetPropEntity("m_hAttachedToEntity", value)}
2818 CBaseEntity["GetAttachedToEntity"] <- function(value){return GetPropEntity("m_hAttachedToEntity")}
2819
2820 CBaseEntity["SetAttachment"] <- function(value){SetProp("m_nAttachment", value.tointeger())}
2821 CBaseEntity["GetAttachment"] <- function(value){return GetProp("m_nAttachment")}
2822
2823 CBaseEntity["SetScaleTime"] <- function(value){SetProp("m_flScaleTime", value.tofloat())}
2824 CBaseEntity["GetScaleTime"] <- function(value){return GetProp("m_flScaleTime")}
2825
2826 CBaseEntity["SetSpriteScale"] <- function(value){SetProp("m_flSpriteScale", value.tofloat())}
2827 CBaseEntity["GetSpriteScale"] <- function(value){return GetProp("m_flSpriteScale")}
2828
2829 CBaseEntity["SetGlowProxySize"] <- function(value){SetProp("m_flGlowProxySize", value.tofloat())}
2830 CBaseEntity["GetGlowProxySize"] <- function(value){return GetProp("m_flGlowProxySize")}
2831
2832 CBaseEntity["SetHDRColorScale"] <- function(value){SetProp("m_flHDRColorScale", value.tofloat())}
2833 CBaseEntity["GetHDRColorScale"] <- function(value){return GetProp("m_flHDRColorScale")}
2834
2835 CBaseEntity["SetSpriteFramerate"] <- function(value){SetProp("m_flSpriteFramerate", value.tofloat())}
2836 CBaseEntity["GetSpriteFramerate"] <- function(value){return GetProp("m_flSpriteFramerate")}
2837
2838 CBaseEntity["SetFrame"] <- function(value){SetProp("m_flFrame", value.tofloat())}
2839 CBaseEntity["GetFrame"] <- function(value){return GetProp("m_flFrame")}
2840
2841 CBaseEntity["SetBrightnessTime"] <- function(value){SetProp("m_flBrightnessTime", value.tofloat())}
2842 CBaseEntity["GetBrightnessTime"] <- function(value){return GetProp("m_flBrightnessTime")}
2843
2844 CBaseEntity["SetBrightness"] <- function(value){SetProp("m_nBrightness", value.tointeger())}
2845 CBaseEntity["GetBrightness"] <- function(value){return GetProp("m_nBrightness")}
2846
2847 CBaseEntity["SetWorldSpaceScale"] <- function(value){SetProp("m_bWorldSpaceScale", value.tointeger())}
2848 CBaseEntity["GetWorldSpaceScale"] <- function(value){return GetProp("m_bWorldSpaceScale")}
2849
2850 CBaseEntity["SetLastTime"] <- function(value){SetProp("m_flLastTime", value.tofloat())}
2851 CBaseEntity["GetLastTime"] <- function(value){return GetProp("m_flLastTime")}
2852
2853 CBaseEntity["SetMaxFrame"] <- function(value){SetProp("m_flMaxFrame", value.tofloat())}
2854 CBaseEntity["GetMaxFrame"] <- function(value){return GetProp("m_flMaxFrame")}
2855
2856 CBaseEntity["SetAttachedToEntity"] <- function(value){SetPropEntity("m_hAttachedToEntity", value)}
2857 CBaseEntity["GetAttachedToEntity"] <- function(value){return GetPropEntity("m_hAttachedToEntity")}
2858
2859 CBaseEntity["SetDieTime"] <- function(value){SetProp("m_flDieTime", value.tofloat())}
2860 CBaseEntity["GetDieTime"] <- function(value){return GetProp("m_flDieTime")}
2861
2862 CBaseEntity["SetStartScale"] <- function(value){SetProp("m_flStartScale", value.tofloat())}
2863 CBaseEntity["GetStartScale"] <- function(value){return GetProp("m_flStartScale")}
2864
2865 CBaseEntity["SetDestScale"] <- function(value){SetProp("m_flDestScale", value.tofloat())}
2866 CBaseEntity["GetDestScale"] <- function(value){return GetProp("m_flDestScale")}
2867
2868 CBaseEntity["SetScaleTimeStart"] <- function(value){SetProp("m_flScaleTimeStart", value.tofloat())}
2869 CBaseEntity["GetScaleTimeStart"] <- function(value){return GetProp("m_flScaleTimeStart")}
2870
2871 CBaseEntity["SetStartBrightness"] <- function(value){SetProp("m_nStartBrightness", value.tointeger())}
2872 CBaseEntity["GetStartBrightness"] <- function(value){return GetProp("m_nStartBrightness")}
2873
2874 CBaseEntity["SetDestBrightness"] <- function(value){SetProp("m_nDestBrightness", value.tointeger())}
2875 CBaseEntity["GetDestBrightness"] <- function(value){return GetProp("m_nDestBrightness")}
2876
2877 CBaseEntity["SetBrightnessTimeStart"] <- function(value){SetProp("m_flBrightnessTimeStart", value.tofloat())}
2878 CBaseEntity["GetBrightnessTimeStart"] <- function(value){return GetProp("m_flBrightnessTimeStart")}
2879
2880
2881 CBaseEntity["SetLifeTime"] <- function(value){SetProp("m_flLifeTime", value.tofloat())}
2882 CBaseEntity["GetLifeTime"] <- function(value){return GetProp("m_flLifeTime")}
2883
2884 CBaseEntity["SetStartWidth"] <- function(value){SetProp("m_flStartWidth", value.tofloat())}
2885 CBaseEntity["GetStartWidth"] <- function(value){return GetProp("m_flStartWidth")}
2886
2887 CBaseEntity["SetEndWidth"] <- function(value){SetProp("m_flEndWidth", value.tofloat())}
2888 CBaseEntity["GetEndWidth"] <- function(value){return GetProp("m_flEndWidth")}
2889
2890 CBaseEntity["SetStartWidthVariance"] <- function(value){SetProp("m_flStartWidthVariance", value.tofloat())}
2891 CBaseEntity["GetStartWidthVariance"] <- function(value){return GetProp("m_flStartWidthVariance")}
2892
2893 CBaseEntity["SetTextureRes"] <- function(value){SetProp("m_flTextureRes", value.tofloat())}
2894 CBaseEntity["GetTextureRes"] <- function(value){return GetProp("m_flTextureRes")}
2895
2896 CBaseEntity["SetMinFadeLength"] <- function(value){SetProp("m_flMinFadeLength", value.tofloat())}
2897 CBaseEntity["GetMinFadeLength"] <- function(value){return GetProp("m_flMinFadeLength")}
2898
2899 CBaseEntity["SetSkyboxOrigin"] <- function(value){SetProp("m_vecSkyboxOrigin", value)}
2900 CBaseEntity["GetSkyboxOrigin"] <- function(value){return GetProp("m_vecSkyboxOrigin")}
2901
2902 CBaseEntity["SetSkyboxScale"] <- function(value){SetProp("m_flSkyboxScale", value.tofloat())}
2903 CBaseEntity["GetSkyboxScale"] <- function(value){return GetProp("m_flSkyboxScale")}
2904
2905 CBaseEntity["SetSpriteName"] <- function(value){SetProp("m_iszSpriteName", value.tostring())}
2906 CBaseEntity["GetSpriteName"] <- function(value){return GetProp("m_iszSpriteName")}
2907
2908 CBaseEntity["SetAnimate"] <- function(value){SetProp("m_bAnimate", value.tointeger())}
2909 CBaseEntity["GetAnimate"] <- function(value){return GetProp("m_bAnimate")}
2910
2911 CBaseEntity["SetLastTime"] <- function(value){SetProp("m_flLastTime", value.tofloat())}
2912 CBaseEntity["GetLastTime"] <- function(value){return GetProp("m_flLastTime")}
2913
2914 CBaseEntity["SetMaxFrame"] <- function(value){SetProp("m_flMaxFrame", value.tofloat())}
2915 CBaseEntity["GetMaxFrame"] <- function(value){return GetProp("m_flMaxFrame")}
2916
2917 CBaseEntity["SetAttachedToEntity"] <- function(value){SetPropEntity("m_hAttachedToEntity", value)}
2918 CBaseEntity["GetAttachedToEntity"] <- function(value){return GetPropEntity("m_hAttachedToEntity")}
2919
2920 CBaseEntity["SetAttachment"] <- function(value){SetProp("m_nAttachment", value.tointeger())}
2921 CBaseEntity["GetAttachment"] <- function(value){return GetProp("m_nAttachment")}
2922
2923 CBaseEntity["SetDieTime"] <- function(value){SetProp("m_flDieTime", value.tofloat())}
2924 CBaseEntity["GetDieTime"] <- function(value){return GetProp("m_flDieTime")}
2925
2926 CBaseEntity["SetBrightness"] <- function(value){SetProp("m_nBrightness", value.tointeger())}
2927 CBaseEntity["GetBrightness"] <- function(value){return GetProp("m_nBrightness")}
2928
2929 CBaseEntity["SetBrightnessTime"] <- function(value){SetProp("m_flBrightnessTime", value.tofloat())}
2930 CBaseEntity["GetBrightnessTime"] <- function(value){return GetProp("m_flBrightnessTime")}
2931
2932 CBaseEntity["SetSpriteScale"] <- function(value){SetProp("m_flSpriteScale", value.tofloat())}
2933 CBaseEntity["GetSpriteScale"] <- function(value){return GetProp("m_flSpriteScale")}
2934
2935 CBaseEntity["SetSpriteFramerate"] <- function(value){SetProp("m_flSpriteFramerate", value.tofloat())}
2936 CBaseEntity["GetSpriteFramerate"] <- function(value){return GetProp("m_flSpriteFramerate")}
2937
2938 CBaseEntity["SetFrame"] <- function(value){SetProp("m_flFrame", value.tofloat())}
2939 CBaseEntity["GetFrame"] <- function(value){return GetProp("m_flFrame")}
2940
2941 CBaseEntity["SetHDRColorScale"] <- function(value){SetProp("m_flHDRColorScale", value.tofloat())}
2942 CBaseEntity["GetHDRColorScale"] <- function(value){return GetProp("m_flHDRColorScale")}
2943
2944 CBaseEntity["SetGlowProxySize"] <- function(value){SetProp("m_flGlowProxySize", value.tofloat())}
2945 CBaseEntity["GetGlowProxySize"] <- function(value){return GetProp("m_flGlowProxySize")}
2946
2947 CBaseEntity["SetScaleTime"] <- function(value){SetProp("m_flScaleTime", value.tofloat())}
2948 CBaseEntity["GetScaleTime"] <- function(value){return GetProp("m_flScaleTime")}
2949
2950 CBaseEntity["SetStartScale"] <- function(value){SetProp("m_flStartScale", value.tofloat())}
2951 CBaseEntity["GetStartScale"] <- function(value){return GetProp("m_flStartScale")}
2952
2953 CBaseEntity["SetDestScale"] <- function(value){SetProp("m_flDestScale", value.tofloat())}
2954 CBaseEntity["GetDestScale"] <- function(value){return GetProp("m_flDestScale")}
2955
2956 CBaseEntity["SetScaleTimeStart"] <- function(value){SetProp("m_flScaleTimeStart", value.tofloat())}
2957 CBaseEntity["GetScaleTimeStart"] <- function(value){return GetProp("m_flScaleTimeStart")}
2958
2959 CBaseEntity["SetStartBrightness"] <- function(value){SetProp("m_nStartBrightness", value.tointeger())}
2960 CBaseEntity["GetStartBrightness"] <- function(value){return GetProp("m_nStartBrightness")}
2961
2962 CBaseEntity["SetDestBrightness"] <- function(value){SetProp("m_nDestBrightness", value.tointeger())}
2963 CBaseEntity["GetDestBrightness"] <- function(value){return GetProp("m_nDestBrightness")}
2964
2965 CBaseEntity["SetBrightnessTimeStart"] <- function(value){SetProp("m_flBrightnessTimeStart", value.tofloat())}
2966 CBaseEntity["GetBrightnessTimeStart"] <- function(value){return GetProp("m_flBrightnessTimeStart")}
2967
2968 CBaseEntity["SetWorldSpaceScale"] <- function(value){SetProp("m_bWorldSpaceScale", value.tointeger())}
2969 CBaseEntity["GetWorldSpaceScale"] <- function(value){return GetProp("m_bWorldSpaceScale")}
2970
2971
2972 CBaseEntity["SetSpreadSpeed"] <- function(value){SetProp("m_SpreadSpeed", value.tofloat())}
2973 CBaseEntity["GetSpreadSpeed"] <- function(value){return GetProp("m_SpreadSpeed")}
2974
2975 CBaseEntity["SetSpeed"] <- function(value){SetProp("m_Speed", value.tofloat())}
2976 CBaseEntity["GetSpeed"] <- function(value){return GetProp("m_Speed")}
2977
2978 CBaseEntity["SetStartSize"] <- function(value){SetProp("m_StartSize", value.tofloat())}
2979 CBaseEntity["GetStartSize"] <- function(value){return GetProp("m_StartSize")}
2980
2981 CBaseEntity["SetEndSize"] <- function(value){SetProp("m_EndSize", value.tofloat())}
2982 CBaseEntity["GetEndSize"] <- function(value){return GetProp("m_EndSize")}
2983
2984 CBaseEntity["SetRate"] <- function(value){SetProp("m_Rate", value.tofloat())}
2985 CBaseEntity["GetRate"] <- function(value){return GetProp("m_Rate")}
2986
2987 CBaseEntity["SetJetLength"] <- function(value){SetProp("m_JetLength", value.tofloat())}
2988 CBaseEntity["GetJetLength"] <- function(value){return GetProp("m_JetLength")}
2989
2990 CBaseEntity["SetEmit"] <- function(value){SetProp("m_bEmit", value.tointeger())}
2991 CBaseEntity["GetEmit"] <- function(value){return GetProp("m_bEmit")}
2992
2993 CBaseEntity["SetFaceLeft"] <- function(value){SetProp("m_bFaceLeft", value.tointeger())}
2994 CBaseEntity["GetFaceLeft"] <- function(value){return GetProp("m_bFaceLeft")}
2995
2996 CBaseEntity["SetType"] <- function(value){SetProp("m_nType", value.tointeger())}
2997 CBaseEntity["GetType"] <- function(value){return GetProp("m_nType")}
2998
2999 CBaseEntity["SetRollSpeed"] <- function(value){SetProp("m_flRollSpeed", value.tofloat())}
3000 CBaseEntity["GetRollSpeed"] <- function(value){return GetProp("m_flRollSpeed")}
3001
3002 CBaseEntity["SetNoiseStart"] <- function(value){SetProp("m_NoiseStart", value.tostring())}
3003 CBaseEntity["GetNoiseStart"] <- function(value){return GetProp("m_NoiseStart")}
3004
3005 CBaseEntity["SetInitialState"] <- function(value){SetProp("m_InitialState", value.tointeger())}
3006 CBaseEntity["GetInitialState"] <- function(value){return GetProp("m_InitialState")}
3007
3008
3009 CBaseEntity["SetOverlayColor"] <- function(value){SetProp("m_clrOverlay", value.tointeger())}
3010 CBaseEntity["GetOverlayColor"] <- function(value){return GetProp("m_clrOverlay")}
3011
3012 CBaseEntity["SetDirection"] <- function(value){SetProp("m_vDirection", value)}
3013 CBaseEntity["GetDirection"] <- function(value){return GetProp("m_vDirection")}
3014
3015 CBaseEntity["SetOn"] <- function(value){SetProp("m_bOn", value.tointeger())}
3016 CBaseEntity["GetOn"] <- function(value){return GetProp("m_bOn")}
3017
3018 CBaseEntity["SetSize"] <- function(value){SetProp("m_nSize", value.tointeger())}
3019 CBaseEntity["GetSize"] <- function(value){return GetProp("m_nSize")}
3020
3021 CBaseEntity["SetOverlaySize"] <- function(value){SetProp("m_nOverlaySize", value.tointeger())}
3022 CBaseEntity["GetOverlaySize"] <- function(value){return GetProp("m_nOverlaySize")}
3023
3024 CBaseEntity["SetMaterial"] <- function(value){SetProp("m_strMaterial", value.tostring())}
3025 CBaseEntity["GetMaterial"] <- function(value){return GetProp("m_strMaterial")}
3026
3027 CBaseEntity["SetOverlayMaterial"] <- function(value){SetProp("m_nOverlayMaterial", value.tointeger())}
3028 CBaseEntity["GetOverlayMaterial"] <- function(value){return GetProp("m_nOverlayMaterial")}
3029
3030 CBaseEntity["SetHDRColorScale"] <- function(value){SetProp("HDRColorScale", value.tofloat())}
3031 CBaseEntity["GetHDRColorScale"] <- function(value){return GetProp("HDRColorScale")}
3032
3033 CBaseEntity["SetUseAngles"] <- function(value){SetProp("m_bUseAngles", value.tointeger())}
3034 CBaseEntity["GetUseAngles"] <- function(value){return GetProp("m_bUseAngles")}
3035
3036 CBaseEntity["SetPitch"] <- function(value){SetProp("m_flPitch", value.tofloat())}
3037 CBaseEntity["GetPitch"] <- function(value){return GetProp("m_flPitch")}
3038
3039 CBaseEntity["SetYaw"] <- function(value){SetProp("m_flYaw", value.tofloat())}
3040 CBaseEntity["GetYaw"] <- function(value){return GetProp("m_flYaw")}
3041
3042
3043 CBaseEntity["SetUseCustomAutoExposureMin"] <- function(value){SetProp("m_bUseCustomAutoExposureMin", value.tointeger())}
3044 CBaseEntity["GetUseCustomAutoExposureMin"] <- function(value){return GetProp("m_bUseCustomAutoExposureMin")}
3045
3046 CBaseEntity["SetUseCustomAutoExposureMax"] <- function(value){SetProp("m_bUseCustomAutoExposureMax", value.tointeger())}
3047 CBaseEntity["GetUseCustomAutoExposureMax"] <- function(value){return GetProp("m_bUseCustomAutoExposureMax")}
3048
3049 CBaseEntity["SetUseCustomBloomScale"] <- function(value){SetProp("m_bUseCustomBloomScale", value.tointeger())}
3050 CBaseEntity["GetUseCustomBloomScale"] <- function(value){return GetProp("m_bUseCustomBloomScale")}
3051
3052 CBaseEntity["SetCustomAutoExposureMin"] <- function(value){SetProp("m_flCustomAutoExposureMin", value.tofloat())}
3053 CBaseEntity["GetCustomAutoExposureMin"] <- function(value){return GetProp("m_flCustomAutoExposureMin")}
3054
3055 CBaseEntity["SetCustomAutoExposureMax"] <- function(value){SetProp("m_flCustomAutoExposureMax", value.tofloat())}
3056 CBaseEntity["GetCustomAutoExposureMax"] <- function(value){return GetProp("m_flCustomAutoExposureMax")}
3057
3058 CBaseEntity["SetCustomBloomScale"] <- function(value){SetProp("m_flCustomBloomScale", value.tofloat())}
3059 CBaseEntity["GetCustomBloomScale"] <- function(value){return GetProp("m_flCustomBloomScale")}
3060
3061 CBaseEntity["SetCustomBloomScaleMinimum"] <- function(value){SetProp("m_flCustomBloomScaleMinimum", value.tofloat())}
3062 CBaseEntity["GetCustomBloomScaleMinimum"] <- function(value){return GetProp("m_flCustomBloomScaleMinimum")}
3063
3064 CBaseEntity["SetBloomExponent"] <- function(value){SetProp("m_flBloomExponent", value.tofloat())}
3065 CBaseEntity["GetBloomExponent"] <- function(value){return GetProp("m_flBloomExponent")}
3066
3067 CBaseEntity["SetBloomSaturation"] <- function(value){SetProp("m_flBloomSaturation", value.tofloat())}
3068 CBaseEntity["GetBloomSaturation"] <- function(value){return GetProp("m_flBloomSaturation")}
3069
3070 CBaseEntity["SetTonemapPercentTarget"] <- function(value){SetProp("m_flTonemapPercentTarget", value.tofloat())}
3071 CBaseEntity["GetTonemapPercentTarget"] <- function(value){return GetProp("m_flTonemapPercentTarget")}
3072
3073 CBaseEntity["SetTonemapPercentBrightPixels"] <- function(value){SetProp("m_flTonemapPercentBrightPixels", value.tofloat())}
3074 CBaseEntity["GetTonemapPercentBrightPixels"] <- function(value){return GetProp("m_flTonemapPercentBrightPixels")}
3075
3076 CBaseEntity["SetTonemapMinAvgLum"] <- function(value){SetProp("m_flTonemapMinAvgLum", value.tofloat())}
3077 CBaseEntity["GetTonemapMinAvgLum"] <- function(value){return GetProp("m_flTonemapMinAvgLum")}
3078
3079 CBaseEntity["SetBlendTonemapStart"] <- function(value){SetProp("m_flBlendTonemapStart", value.tofloat())}
3080 CBaseEntity["GetBlendTonemapStart"] <- function(value){return GetProp("m_flBlendTonemapStart")}
3081
3082 CBaseEntity["SetBlendTonemapEnd"] <- function(value){SetProp("m_flBlendTonemapEnd", value.tofloat())}
3083 CBaseEntity["GetBlendTonemapEnd"] <- function(value){return GetProp("m_flBlendTonemapEnd")}
3084
3085 CBaseEntity["SetBlendEndTime"] <- function(value){SetProp("m_flBlendEndTime", value.tofloat())}
3086 CBaseEntity["GetBlendEndTime"] <- function(value){return GetProp("m_flBlendEndTime")}
3087
3088 CBaseEntity["SetBlendStartTime"] <- function(value){SetProp("m_flBlendStartTime", value.tofloat())}
3089 CBaseEntity["GetBlendStartTime"] <- function(value){return GetProp("m_flBlendStartTime")}
3090
3091
3092 CBaseEntity["SetWeaponType"] <- function(value){SetProp("m_iWeaponType", value.tointeger())}
3093 CBaseEntity["GetWeaponType"] <- function(value){return GetProp("m_iWeaponType")}
3094
3095 CBaseEntity["SetShotsTaken"] <- function(value){SetProp("m_iShotsTaken", value.tointeger())}
3096 CBaseEntity["GetShotsTaken"] <- function(value){return GetProp("m_iShotsTaken")}
3097
3098 CBaseEntity["SetShotDest"] <- function(value){SetProp("m_vecShotDest", value)}
3099 CBaseEntity["GetShotDest"] <- function(value){return GetProp("m_vecShotDest")}
3100
3101 CBaseEntity["SetDisabled"] <- function(value){SetProp("m_bDisabled", value.tointeger())}
3102 CBaseEntity["GetDisabled"] <- function(value){return GetProp("m_bDisabled")}
3103
3104 CBaseEntity["SetIgnorePlayers"] <- function(value){SetProp("m_bIgnorePlayers", value.tointeger())}
3105 CBaseEntity["GetIgnorePlayers"] <- function(value){return GetProp("m_bIgnorePlayers")}
3106
3107 CBaseEntity["SetTargetArc"] <- function(value){SetProp("m_flTargetArc", value.tofloat())}
3108 CBaseEntity["GetTargetArc"] <- function(value){return GetProp("m_flTargetArc")}
3109
3110 CBaseEntity["SetTargetRange"] <- function(value){SetProp("m_flTargetRange", value.tofloat())}
3111 CBaseEntity["GetTargetRange"] <- function(value){return GetProp("m_flTargetRange")}
3112
3113 CBaseEntity["SetDamageMod"] <- function(value){SetProp("m_flDamageMod", value.tofloat())}
3114 CBaseEntity["GetDamageMod"] <- function(value){return GetProp("m_flDamageMod")}
3115
3116 CBaseEntity["SetFilterName"] <- function(value){SetProp("m_iFilterName", value.tostring())}
3117 CBaseEntity["GetFilterName"] <- function(value){return GetProp("m_iFilterName")}
3118
3119 CBaseEntity["SetEnemyTeam"] <- function(value){SetProp("m_iEnemyTeam", value.tointeger())}
3120 CBaseEntity["GetEnemyTeam"] <- function(value){return GetProp("m_iEnemyTeam")}
3121
3122
3123 CBaseEntity["SetMinWind"] <- function(value){SetProp("m_iMinWind", value.tointeger())}
3124 CBaseEntity["GetMinWind"] <- function(value){return GetProp("m_iMinWind")}
3125
3126 CBaseEntity["SetMaxWind"] <- function(value){SetProp("m_iMaxWind", value.tointeger())}
3127 CBaseEntity["GetMaxWind"] <- function(value){return GetProp("m_iMaxWind")}
3128
3129 CBaseEntity["SetWindRadius"] <- function(value){SetProp("m_windRadius", value.tointeger())}
3130 CBaseEntity["GetWindRadius"] <- function(value){return GetProp("m_windRadius")}
3131
3132 CBaseEntity["SetMinGust"] <- function(value){SetProp("m_iMinGust", value.tointeger())}
3133 CBaseEntity["GetMinGust"] <- function(value){return GetProp("m_iMinGust")}
3134
3135 CBaseEntity["SetMaxGust"] <- function(value){SetProp("m_iMaxGust", value.tointeger())}
3136 CBaseEntity["GetMaxGust"] <- function(value){return GetProp("m_iMaxGust")}
3137
3138 CBaseEntity["SetMinGustDelay"] <- function(value){SetProp("m_flMinGustDelay", value.tofloat())}
3139 CBaseEntity["GetMinGustDelay"] <- function(value){return GetProp("m_flMinGustDelay")}
3140
3141 CBaseEntity["SetMaxGustDelay"] <- function(value){SetProp("m_flMaxGustDelay", value.tofloat())}
3142 CBaseEntity["GetMaxGustDelay"] <- function(value){return GetProp("m_flMaxGustDelay")}
3143
3144 CBaseEntity["SetGustDirChange"] <- function(value){SetProp("m_iGustDirChange", value.tointeger())}
3145 CBaseEntity["GetGustDirChange"] <- function(value){return GetProp("m_iGustDirChange")}
3146
3147 CBaseEntity["SetWindSeed"] <- function(value){SetProp("m_iWindSeed", value.tointeger())}
3148 CBaseEntity["GetWindSeed"] <- function(value){return GetProp("m_iWindSeed")}
3149
3150 CBaseEntity["SetLocation"] <- function(value){SetProp("m_location", value)}
3151 CBaseEntity["GetLocation"] <- function(value){return GetProp("m_location")}
3152
3153 CBaseEntity["SetInitialWindDir"] <- function(value){SetProp("m_iInitialWindDir", value.tointeger())}
3154 CBaseEntity["GetInitialWindDir"] <- function(value){return GetProp("m_iInitialWindDir")}
3155
3156 CBaseEntity["SetInitialWindSpeed"] <- function(value){SetProp("m_flInitialWindSpeed", value.tofloat())}
3157 CBaseEntity["GetInitialWindSpeed"] <- function(value){return GetProp("m_flInitialWindSpeed")}
3158
3159 CBaseEntity["SetStartTime"] <- function(value){SetProp("m_flStartTime", value.tofloat())}
3160 CBaseEntity["GetStartTime"] <- function(value){return GetProp("m_flStartTime")}
3161
3162 CBaseEntity["SetGustDuration"] <- function(value){SetProp("m_flGustDuration", value.tofloat())}
3163 CBaseEntity["GetGustDuration"] <- function(value){return GetProp("m_flGustDuration")}
3164
3165 CBaseEntity["SetWindDir"] <- function(value){SetProp("m_iWindDir", value.tointeger())}
3166 CBaseEntity["GetWindDir"] <- function(value){return GetProp("m_iWindDir")}
3167
3168 CBaseEntity["SetWindSpeed"] <- function(value){SetProp("m_flWindSpeed", value.tofloat())}
3169 CBaseEntity["GetWindSpeed"] <- function(value){return GetProp("m_flWindSpeed")}
3170
3171
3172 CBaseEntity["SetTriggerState"] <- function(value){SetProp("m_triggerState", value.tointeger())}
3173 CBaseEntity["GetTriggerState"] <- function(value){return GetProp("m_triggerState")}
3174
3175 CBaseEntity["SetDisabled"] <- function(value){SetProp("m_bDisabled", value.tointeger())}
3176 CBaseEntity["GetDisabled"] <- function(value){return GetProp("m_bDisabled")}
3177
3178 CBaseEntity["SetFirstUseDelay"] <- function(value){SetProp("m_firstUseDelay", value.tofloat())}
3179 CBaseEntity["GetFirstUseDelay"] <- function(value){return GetProp("m_firstUseDelay")}
3180
3181 CBaseEntity["SetUseDelay"] <- function(value){SetProp("m_useDelay", value.tofloat())}
3182 CBaseEntity["GetUseDelay"] <- function(value){return GetProp("m_useDelay")}
3183
3184 CBaseEntity["SetType"] <- function(value){SetProp("m_type", value.tointeger())}
3185 CBaseEntity["GetType"] <- function(value){return GetProp("m_type")}
3186
3187 CBaseEntity["SetScriptFile"] <- function(value){SetProp("m_scriptfile", value.tostring())}
3188 CBaseEntity["GetScriptFile"] <- function(value){return GetProp("m_scriptfile")}
3189
3190 CBaseEntity["SetVersusTravelCompletion"] <- function(value){SetProp("m_flVersusTravelCompletion", value.tofloat())}
3191 CBaseEntity["GetVersusTravelCompletion"] <- function(value){return GetProp("m_flVersusTravelCompletion")}
3192
3193 CBaseEntity["SetSacrificeFinale"] <- function(value){SetProp("m_bIsSacrificeFinale", value.tointeger())}
3194 CBaseEntity["GetSacrificeFinale"] <- function(value){return GetProp("m_bIsSacrificeFinale")}
3195
3196
3197 CBaseEntity["SetPoolOrigin"] <- function(value){SetProp("m_poolOrigin", value)}
3198 CBaseEntity["GetPoolOrigin"] <- function(value){return GetProp("m_poolOrigin")}
3199
3200 CBaseEntity["SetAngle"] <- function(value){SetProp("m_angle", value.tofloat())}
3201 CBaseEntity["GetAngle"] <- function(value){return GetProp("m_angle")}
3202
3203 CBaseEntity["SetX"] <- function(value){SetProp("m_x", value.tofloat())}
3204 CBaseEntity["GetX"] <- function(value){return GetProp("m_x")}
3205
3206 CBaseEntity["SetY"] <- function(value){SetProp("m_y", value.tofloat())}
3207 CBaseEntity["GetY"] <- function(value){return GetProp("m_y")}
3208
3209 CBaseEntity["SetZ"] <- function(value){SetProp("m_z", value.tofloat())}
3210 CBaseEntity["GetZ"] <- function(value){return GetProp("m_z")}
3211
3212 CBaseEntity["SetWaterLevel"] <- function(value){SetProp("m_waterLevel", value.tofloat())}
3213 CBaseEntity["GetWaterLevel"] <- function(value){return GetProp("m_waterLevel")}
3214
3215 CBaseEntity["SetPool"] <- function(value){SetPropEntity("m_pool", value)}
3216 CBaseEntity["GetPool"] <- function(value){return GetPropEntity("m_pool")}
3217
3218 CBaseEntity["SetID"] <- function(value){SetProp("m_id", value.tointeger())}
3219 CBaseEntity["GetID"] <- function(value){return GetProp("m_id")}
3220
3221 CBaseEntity["SetAngleChange"] <- function(value){SetProp("m_angleChange", value.tofloat())}
3222 CBaseEntity["GetAngleChange"] <- function(value){return GetProp("m_angleChange")}
3223
3224 CBaseEntity["SetForward"] <- function(value){SetProp("m_forward", value)}
3225 CBaseEntity["GetForward"] <- function(value){return GetProp("m_forward")}
3226
3227 CBaseEntity["SetPerp"] <- function(value){SetPropEntity("m_perp", value)}
3228 CBaseEntity["GetPerp"] <- function(value){return GetPropEntity("m_perp")}
3229
3230 CBaseEntity["SetSpeed"] <- function(value){SetProp("m_speed", value.tofloat())}
3231 CBaseEntity["GetSpeed"] <- function(value){return GetProp("m_speed")}
3232
3233 CBaseEntity["SetDesiredSpeed"] <- function(value){SetProp("m_desiredSpeed", value.tofloat())}
3234 CBaseEntity["GetDesiredSpeed"] <- function(value){return GetProp("m_desiredSpeed")}
3235
3236 CBaseEntity["SetCalmSpeed"] <- function(value){SetProp("m_calmSpeed", value.tofloat())}
3237 CBaseEntity["GetCalmSpeed"] <- function(value){return GetProp("m_calmSpeed")}
3238
3239 CBaseEntity["SetPanicSpeed"] <- function(value){SetProp("m_panicSpeed", value.tofloat())}
3240 CBaseEntity["GetPanicSpeed"] <- function(value){return GetProp("m_panicSpeed")}
3241
3242 CBaseEntity["SetAvoidRange"] <- function(value){SetProp("m_avoidRange", value.tofloat())}
3243 CBaseEntity["GetAvoidRange"] <- function(value){return GetProp("m_avoidRange")}
3244
3245 CBaseEntity["SetTurnClockwise"] <- function(value){SetProp("m_turnClockwise", value.tointeger())}
3246 CBaseEntity["GetTurnClockwise"] <- function(value){return GetProp("m_turnClockwise")}
3247
3248
3249 CBaseEntity["SetFadeDist"] <- function(value){SetProp("m_flFadeDist", value.tofloat())}
3250 CBaseEntity["GetFadeDist"] <- function(value){return GetProp("m_flFadeDist")}
3251
3252 CBaseEntity["SetFadeStartDist"] <- function(value){SetProp("m_flFadeStartDist", value.tofloat())}
3253 CBaseEntity["GetFadeStartDist"] <- function(value){return GetProp("m_flFadeStartDist")}
3254
3255 CBaseEntity["SetTranslucencyLimit"] <- function(value){SetProp("m_flTranslucencyLimit", value.tofloat())}
3256 CBaseEntity["GetTranslucencyLimit"] <- function(value){return GetProp("m_flTranslucencyLimit")}
3257
3258 CBaseEntity["SetBackgroundModelIndex"] <- function(value){SetProp("m_iBackgroundModelIndex", value.tointeger())}
3259 CBaseEntity["GetBackgroundModelIndex"] <- function(value){return GetProp("m_iBackgroundModelIndex")}
3260
3261 CBaseEntity["SetPortalNumber"] <- function(value){SetProp("m_portalNumber", value.tointeger())}
3262 CBaseEntity["GetPortalNumber"] <- function(value){return GetProp("m_portalNumber")}
3263
3264 CBaseEntity["SetBackgroundBModelName"] <- function(value){SetProp("m_iBackgroundBModelName", value.tostring())}
3265 CBaseEntity["GetBackgroundBModelName"] <- function(value){return GetProp("m_iBackgroundBModelName")}
3266
3267 CBaseEntity["SetPortalVersion"] <- function(value){SetProp("m_iPortalVersion", value.tointeger())}
3268 CBaseEntity["GetPortalVersion"] <- function(value){return GetProp("m_iPortalVersion")}
3269
3270
3271 CBaseEntity["SetNumWide"] <- function(value){SetProp("m_nNumWide", value.tointeger())}
3272 CBaseEntity["GetNumWide"] <- function(value){return GetProp("m_nNumWide")}
3273
3274 CBaseEntity["SetNumHigh"] <- function(value){SetProp("m_nNumHigh", value.tointeger())}
3275 CBaseEntity["GetNumHigh"] <- function(value){return GetProp("m_nNumHigh")}
3276
3277 CBaseEntity["SetPanelWidth"] <- function(value){SetProp("m_flPanelWidth", value.tofloat())}
3278 CBaseEntity["GetPanelWidth"] <- function(value){return GetProp("m_flPanelWidth")}
3279
3280 CBaseEntity["SetPanelHeight"] <- function(value){SetProp("m_flPanelHeight", value.tofloat())}
3281 CBaseEntity["GetPanelHeight"] <- function(value){return GetProp("m_flPanelHeight")}
3282
3283 CBaseEntity["SetNormal"] <- function(value){SetProp("m_vNormal", value)}
3284 CBaseEntity["GetNormal"] <- function(value){return GetProp("m_vNormal")}
3285
3286 CBaseEntity["SetCorner"] <- function(value){SetProp("m_vCorner", value)}
3287 CBaseEntity["GetCorner"] <- function(value){return GetProp("m_vCorner")}
3288
3289 CBaseEntity["SetBroken"] <- function(value){SetProp("m_bIsBroken", value.tointeger())}
3290 CBaseEntity["GetBroken"] <- function(value){return GetProp("m_bIsBroken")}
3291
3292 CBaseEntity["SetSurfaceType"] <- function(value){SetProp("m_nSurfaceType", value.tointeger())}
3293 CBaseEntity["GetSurfaceType"] <- function(value){return GetProp("m_nSurfaceType")}
3294
3295 CBaseEntity["SetNoGhostCollision"] <- function(value){SetProp("m_noGhostCollision", value.tointeger())}
3296 CBaseEntity["GetNoGhostCollision"] <- function(value){return GetProp("m_noGhostCollision")}
3297
3298 CBaseEntity["SetRawPanelBitVec"] <- function(value){SetProp("m_RawPanelBitVec", value)}
3299 CBaseEntity["GetRawPanelBitVec"] <- function(value){return GetProp("m_RawPanelBitVec", null, true)}
3300
3301 CBaseEntity["SetFragility"] <- function(value){SetProp("m_nFragility", value.tointeger())}
3302 CBaseEntity["GetFragility"] <- function(value){return GetProp("m_nFragility")}
3303
3304 CBaseEntity["SetQuadError"] <- function(value){SetProp("m_nQuadError", value.tointeger())}
3305 CBaseEntity["GetQuadError"] <- function(value){return GetProp("m_nQuadError")}
3306
3307 CBaseEntity["SetCorner"] <- function(value){SetProp("m_vCorner", value)}
3308 CBaseEntity["GetCorner"] <- function(value){return GetProp("m_vCorner")}
3309
3310 CBaseEntity["SetBroken"] <- function(value){SetProp("m_bIsBroken", value.tointeger())}
3311 CBaseEntity["GetBroken"] <- function(value){return GetProp("m_bIsBroken")}
3312
3313 CBaseEntity["SetNumBrokenPanes"] <- function(value){SetProp("m_nNumBrokenPanes", value.tointeger())}
3314 CBaseEntity["GetNumBrokenPanes"] <- function(value){return GetProp("m_nNumBrokenPanes")}
3315
3316 CBaseEntity["SetSupport"] <- function(value){SetProp("m_flSupport", value.tofloat())}
3317 CBaseEntity["GetSupport"] <- function(value){return GetProp("m_flSupport")}
3318
3319
3320 CBaseEntity["SetGlowEntity"] <- function(value){SetPropEntity("m_glowEntity", value)}
3321 CBaseEntity["GetGlowEntity"] <- function(value){return GetPropEntity("m_glowEntity")}
3322
3323 CBaseEntity["SetUsable"] <- function(value){SetProp("m_usable", value.tointeger())}
3324 CBaseEntity["GetUsable"] <- function(value){return GetProp("m_usable")}
3325
3326 CBaseEntity["SetMoveDir"] <- function(value){SetProp("m_vecMoveDir", value)}
3327 CBaseEntity["GetMoveDir"] <- function(value){return GetProp("m_vecMoveDir")}
3328
3329 CBaseEntity["SetStayPushed"] <- function(value){SetProp("m_fStayPushed", value.tofloat())}
3330 CBaseEntity["GetStayPushed"] <- function(value){return GetProp("m_fStayPushed")}
3331
3332 CBaseEntity["SetRotating"] <- function(value){SetProp("m_fRotating", value.tofloat())}
3333 CBaseEntity["GetRotating"] <- function(value){return GetProp("m_fRotating")}
3334
3335 CBaseEntity["SetLockedSound"] <- function(value){SetProp("m_bLockedSound", value.tointeger())}
3336 CBaseEntity["GetLockedSound"] <- function(value){return GetProp("m_bLockedSound")}
3337
3338 CBaseEntity["SetLockedSentence"] <- function(value){SetProp("m_bLockedSentence", value.tointeger())}
3339 CBaseEntity["GetLockedSentence"] <- function(value){return GetProp("m_bLockedSentence")}
3340
3341 CBaseEntity["SetUnlockedSound"] <- function(value){SetProp("m_bUnlockedSound", value.tointeger())}
3342 CBaseEntity["GetUnlockedSound"] <- function(value){return GetProp("m_bUnlockedSound")}
3343
3344 CBaseEntity["SetUnlockedSentence"] <- function(value){SetProp("m_bUnlockedSentence", value.tointeger())}
3345 CBaseEntity["GetUnlockedSentence"] <- function(value){return GetProp("m_bUnlockedSentence")}
3346
3347 CBaseEntity["SetLocked"] <- function(value){SetProp("m_bLocked", value.tointeger())}
3348 CBaseEntity["GetLocked"] <- function(value){return GetProp("m_bLocked")}
3349
3350 CBaseEntity["SetNoise"] <- function(value){SetProp("m_sNoise", value.tostring())}
3351 CBaseEntity["GetNoise"] <- function(value){return GetProp("m_sNoise")}
3352
3353 CBaseEntity["SetUseLockedTime"] <- function(value){SetProp("m_flUseLockedTime", value.tofloat())}
3354 CBaseEntity["GetUseLockedTime"] <- function(value){return GetProp("m_flUseLockedTime")}
3355
3356 CBaseEntity["SetSolidBsp"] <- function(value){SetProp("m_bSolidBsp", value.tointeger())}
3357 CBaseEntity["GetSolidBsp"] <- function(value){return GetProp("m_bSolidBsp")}
3358
3359 CBaseEntity["SetSounds"] <- function(value){SetProp("m_sounds", value.tostring())}
3360 CBaseEntity["GetSounds"] <- function(value){return GetProp("m_sounds")}
3361
3362
3363 CBaseEntity["SetUseString"] <- function(value){SetProp("m_sUseString", value.tostring())}
3364 CBaseEntity["GetUseString"] <- function(value){return GetProp("m_sUseString")}
3365
3366 CBaseEntity["SetUseSubstring"] <- function(value){SetProp("m_sUseSubString", value.tostring())}
3367 CBaseEntity["GetUseSubstring"] <- function(value){return GetProp("m_sUseSubString")}
3368
3369 CBaseEntity["SetAutoDisable"] <- function(value){SetProp("m_bAutoDisable", value.tointeger())}
3370 CBaseEntity["GetAutoDisable"] <- function(value){return GetProp("m_bAutoDisable")}
3371
3372 CBaseEntity["SetUseTime"] <- function(value){SetProp("m_nUseTime", value.tofloat())}
3373 CBaseEntity["GetUseTime"] <- function(value){return GetProp("m_nUseTime")}
3374
3375
3376 CBaseEntity["SetConveyorSpeed"] <- function(value){SetProp("m_flConveyorSpeed", value.tofloat())}
3377 CBaseEntity["GetConveyorSpeed"] <- function(value){return GetProp("m_flConveyorSpeed")}
3378
3379 CBaseEntity["SetMoveDir"] <- function(value){SetProp("m_vecMoveDir", value)}
3380 CBaseEntity["GetMoveDir"] <- function(value){return GetProp("m_vecMoveDir")}
3381
3382 CBaseEntity["SetState"] <- function(value){SetProp("m_nState", value.tointeger())}
3383 CBaseEntity["GetState"] <- function(value){return GetProp("m_nState")}
3384
3385
3386 CBaseEntity["SetWaveHeight"] <- function(value){SetProp("m_flWaveHeight", value.tofloat())}
3387 CBaseEntity["GetWaveHeight"] <- function(value){return GetProp("m_flWaveHeight")}
3388
3389 CBaseEntity["SetMoveDir"] <- function(value){SetProp("m_vecMoveDir", value)}
3390 CBaseEntity["GetMoveDir"] <- function(value){return GetProp("m_vecMoveDir")}
3391
3392 CBaseEntity["SetLockedSentence"] <- function(value){SetProp("m_bLockedSentence", value.tointeger())}
3393 CBaseEntity["GetLockedSentence"] <- function(value){return GetProp("m_bLockedSentence")}
3394
3395 CBaseEntity["SetUnlockedSentence"] <- function(value){SetProp("m_bUnlockedSentence", value.tointeger())}
3396 CBaseEntity["GetUnlockedSentence"] <- function(value){return GetProp("m_bUnlockedSentence")}
3397
3398 CBaseEntity["SetNoiseMoving"] <- function(value){SetProp("m_NoiseMoving", value.tostring())}
3399 CBaseEntity["GetNoiseMoving"] <- function(value){return GetProp("m_NoiseMoving")}
3400
3401 CBaseEntity["SetNoiseArrived"] <- function(value){SetProp("m_NoiseArrived", value.tostring())}
3402 CBaseEntity["GetNoiseArrived"] <- function(value){return GetProp("m_NoiseArrived")}
3403
3404 CBaseEntity["SetNoiseMovingClosed"] <- function(value){SetProp("m_NoiseMovingClosed", value.tostring())}
3405 CBaseEntity["GetNoiseMovingClosed"] <- function(value){return GetProp("m_NoiseMovingClosed")}
3406
3407 CBaseEntity["SetNoiseArrivedClosed"] <- function(value){SetProp("m_NoiseArrivedClosed", value.tostring())}
3408 CBaseEntity["GetNoiseArrivedClosed"] <- function(value){return GetProp("m_NoiseArrivedClosed")}
3409
3410 CBaseEntity["SetChainTarget"] <- function(value){SetProp("m_ChainTarget", value.tostring())}
3411 CBaseEntity["GetChainTarget"] <- function(value){return GetProp("m_ChainTarget")}
3412
3413 CBaseEntity["SetLockedSound"] <- function(value){SetProp("m_ls.sLockedSound", value.tostring())}
3414 CBaseEntity["GetLockedSound"] <- function(value){return GetProp("m_ls.sLockedSound")}
3415
3416 CBaseEntity["SetUnlockedSound"] <- function(value){SetProp("m_ls.sUnlockedSound", value.tostring())}
3417 CBaseEntity["GetUnlockedSound"] <- function(value){return GetProp("m_ls.sUnlockedSound")}
3418
3419 CBaseEntity["SetLocked"] <- function(value){SetProp("m_bLocked", value.tointeger())}
3420 CBaseEntity["GetLocked"] <- function(value){return GetProp("m_bLocked")}
3421
3422 CBaseEntity["SetBlockDamage"] <- function(value){SetProp("m_flBlockDamage", value.tofloat())}
3423 CBaseEntity["GetBlockDamage"] <- function(value){return GetProp("m_flBlockDamage")}
3424
3425 CBaseEntity["SetSpawnPosition"] <- function(value){SetProp("m_eSpawnPosition", value)}
3426 CBaseEntity["GetSpawnPosition"] <- function(value){return GetProp("m_eSpawnPosition")}
3427
3428 CBaseEntity["SetForceClosed"] <- function(value){SetProp("m_bForceClosed", value.tointeger())}
3429 CBaseEntity["GetForceClosed"] <- function(value){return GetProp("m_bForceClosed")}
3430
3431 CBaseEntity["SetDoorGroup"] <- function(value){SetProp("m_bDoorGroup", value.tointeger())}
3432 CBaseEntity["GetDoorGroup"] <- function(value){return GetProp("m_bDoorGroup")}
3433
3434 CBaseEntity["SetLoopMoveSound"] <- function(value){SetProp("m_bLoopMoveSound", value.tointeger())}
3435 CBaseEntity["GetLoopMoveSound"] <- function(value){return GetProp("m_bLoopMoveSound")}
3436
3437 CBaseEntity["SetIgnoreDebris"] <- function(value){SetProp("m_bIgnoreDebris", value.tointeger())}
3438 CBaseEntity["GetIgnoreDebris"] <- function(value){return GetProp("m_bIgnoreDebris")}
3439
3440
3441 CBaseEntity["SetColor"] <- function(value){SetProp("m_Color", value.tointeger())}
3442 CBaseEntity["GetColor"] <- function(value){return GetProp("m_Color")}
3443
3444 CBaseEntity["SetSpawnRate"] <- function(value){SetProp("m_SpawnRate", value.tointeger())}
3445 CBaseEntity["GetSpawnRate"] <- function(value){return GetProp("m_SpawnRate")}
3446
3447 CBaseEntity["SetSpeedMax"] <- function(value){SetProp("m_SpeedMax", value.tointeger())}
3448 CBaseEntity["GetSpeedMax"] <- function(value){return GetProp("m_SpeedMax")}
3449
3450 CBaseEntity["SetSizeMin"] <- function(value){SetProp("m_flSizeMin", value.tofloat())}
3451 CBaseEntity["GetSizeMin"] <- function(value){return GetProp("m_flSizeMin")}
3452
3453 CBaseEntity["SetSizeMax"] <- function(value){SetProp("m_flSizeMax", value.tofloat())}
3454 CBaseEntity["GetSizeMax"] <- function(value){return GetProp("m_flSizeMax")}
3455
3456 CBaseEntity["SetDistMax"] <- function(value){SetProp("m_DistMax", value.tointeger())}
3457 CBaseEntity["GetDistMax"] <- function(value){return GetProp("m_DistMax")}
3458
3459 CBaseEntity["SetLifetimeMin"] <- function(value){SetProp("m_LifetimeMin", value.tointeger())}
3460 CBaseEntity["GetLifetimeMin"] <- function(value){return GetProp("m_LifetimeMin")}
3461
3462 CBaseEntity["SetLifetimeMax"] <- function(value){SetProp("m_LifetimeMax", value.tointeger())}
3463 CBaseEntity["GetLifetimeMax"] <- function(value){return GetProp("m_LifetimeMax")}
3464
3465 CBaseEntity["SetDustFlags"] <- function(value){SetProp("m_DustFlags", value.tointeger())}
3466 CBaseEntity["GetDustFlags"] <- function(value){return GetProp("m_DustFlags")}
3467
3468 CBaseEntity["SetFallSpeed"] <- function(value){SetProp("m_FallSpeed", value.tofloat())}
3469 CBaseEntity["GetFallSpeed"] <- function(value){return GetProp("m_FallSpeed")}
3470
3471 CBaseEntity["SetAlpha"] <- function(value){SetProp("m_iAlpha", value.tointeger())}
3472 CBaseEntity["GetAlpha"] <- function(value){return GetProp("m_iAlpha")}
3473
3474
3475 CBaseEntity["SetAcceleration"] <- function(value){SetProp("m_acceleration", value.tofloat())}
3476 CBaseEntity["GetAcceleration"] <- function(value){return GetProp("m_acceleration")}
3477
3478 CBaseEntity["SetMovementStartTime"] <- function(value){SetProp("m_movementStartTime", value.tofloat())}
3479 CBaseEntity["GetMovementStartTime"] <- function(value){return GetProp("m_movementStartTime")}
3480
3481 CBaseEntity["SetMovementStartSpeed"] <- function(value){SetProp("m_movementStartSpeed", value.tofloat())}
3482 CBaseEntity["GetMovementStartSpeed"] <- function(value){return GetProp("m_movementStartSpeed")}
3483
3484 CBaseEntity["SetMovementStartZ"] <- function(value){SetProp("m_movementStartZ", value.tofloat())}
3485 CBaseEntity["GetMovementStartZ"] <- function(value){return GetProp("m_movementStartZ")}
3486
3487 CBaseEntity["SetDestinationFloorPosition"] <- function(value){SetProp("m_destinationFloorPosition", value.tofloat())}
3488 CBaseEntity["GetDestinationFloorPosition"] <- function(value){return GetProp("m_destinationFloorPosition")}
3489
3490 CBaseEntity["SetMaxSpeed"] <- function(value){SetProp("m_maxSpeed", value.tofloat())}
3491 CBaseEntity["GetMaxSpeed"] <- function(value){return GetProp("m_maxSpeed")}
3492
3493 CBaseEntity["SetMoving"] <- function(value){SetProp("m_isMoving", value.tointeger())}
3494 CBaseEntity["GetMoving"] <- function(value){return GetProp("m_isMoving")}
3495
3496 CBaseEntity["SetTopFloorPosition"] <- function(value){SetProp("m_topFloorPosition", value)}
3497 CBaseEntity["GetTopFloorPosition"] <- function(value){return GetProp("m_topFloorPosition")}
3498
3499 CBaseEntity["SetBottomFloorPosition"] <- function(value){SetProp("m_bottomFloorPosition", value)}
3500 CBaseEntity["GetBottomFloorPosition"] <- function(value){return GetProp("m_bottomFloorPosition")}
3501
3502 CBaseEntity["SetSoundStart"] <- function(value){SetProp("m_soundStart", value.tostring())}
3503 CBaseEntity["GetSoundStart"] <- function(value){return GetProp("m_soundStart")}
3504
3505 CBaseEntity["SetSoundStop"] <- function(value){SetProp("m_soundStop", value.tostring())}
3506 CBaseEntity["GetSoundStop"] <- function(value){return GetProp("m_soundStop")}
3507
3508 CBaseEntity["SetSoundDisable"] <- function(value){SetProp("m_soundDisable", value.tostring())}
3509 CBaseEntity["GetSoundDisable"] <- function(value){return GetProp("m_soundDisable")}
3510
3511 CBaseEntity["SetCurrentSound"] <- function(value){SetProp("m_currentSound", value.tostring())}
3512 CBaseEntity["GetCurrentSound"] <- function(value){return GetProp("m_currentSound")}
3513
3514 CBaseEntity["SetBlockDamage"] <- function(value){SetProp("m_flBlockDamage", value.tofloat())}
3515 CBaseEntity["GetBlockDamage"] <- function(value){return GetProp("m_flBlockDamage")}
3516
3517
3518 CBaseEntity["SetDisappearMinDist"] <- function(value){SetProp("m_nDisappearMinDist", value.tointeger())}
3519 CBaseEntity["GetDisappearMinDist"] <- function(value){return GetProp("m_nDisappearMinDist")}
3520
3521 CBaseEntity["SetDisappearMaxDist"] <- function(value){SetProp("m_nDisappearMaxDist", value.tointeger())}
3522 CBaseEntity["GetDisappearMaxDist"] <- function(value){return GetProp("m_nDisappearMaxDist")}
3523
3524
3525 CBaseEntity["SetActive"] <- function(value){SetProp("m_bActive", value.tointeger())}
3526 CBaseEntity["GetActive"] <- function(value){return GetProp("m_bActive")}
3527
3528 CBaseEntity["SetOccluderIndex"] <- function(value){SetProp("m_nOccluderIndex", value.tointeger())}
3529 CBaseEntity["GetOccluderIndex"] <- function(value){return GetProp("m_nOccluderIndex")}
3530
3531
3532 CBaseEntity["SetPhysicsMode"] <- function(value){SetProp("m_iPhysicsMode", value.tointeger())}
3533 CBaseEntity["GetPhysicsMode"] <- function(value){return GetProp("m_iPhysicsMode")}
3534
3535 CBaseEntity["SetMass"] <- function(value){SetProp("m_fMass", value.tofloat())}
3536 CBaseEntity["GetMass"] <- function(value){return GetProp("m_fMass")}
3537
3538 CBaseEntity["SetCarryingPlayer"] <- function(value){SetPropEntity("m_hCarryingPlayer", value)}
3539 CBaseEntity["GetCarryingPlayer"] <- function(value){return GetPropEntity("m_hCarryingPlayer")}
3540
3541 CBaseEntity["SetMassScale"] <- function(value){SetProp("m_massScale", value.tofloat())}
3542 CBaseEntity["GetMassScale"] <- function(value){return GetProp("m_massScale")}
3543
3544 CBaseEntity["SetDamageType"] <- function(value){SetProp("m_damageType", value.tointeger())}
3545 CBaseEntity["GetDamageType"] <- function(value){return GetProp("m_damageType")}
3546
3547 CBaseEntity["SetOverrideScript"] <- function(value){SetProp("m_iszOverrideScript", value.tostring())}
3548 CBaseEntity["GetOverrideScript"] <- function(value){return GetProp("m_iszOverrideScript")}
3549
3550 CBaseEntity["SetDamageToEnableMotion"] <- function(value){SetProp("m_damageToEnableMotion", value.tointeger())}
3551 CBaseEntity["GetDamageToEnableMotion"] <- function(value){return GetProp("m_damageToEnableMotion")}
3552
3553 CBaseEntity["SetForceToEnableMotion"] <- function(value){SetProp("m_flForceToEnableMotion", value.tofloat())}
3554 CBaseEntity["GetForceToEnableMotion"] <- function(value){return GetProp("m_flForceToEnableMotion")}
3555
3556 CBaseEntity["SetPreferredCarryAngles"] <- function(value){SetProp("m_angPreferredCarryAngles", value)}
3557 CBaseEntity["GetPreferredCarryAngles"] <- function(value){return GetProp("m_angPreferredCarryAngles")}
3558
3559 CBaseEntity["SetNotSolidToWorld"] <- function(value){SetProp("m_bNotSolidToWorld", value.tointeger())}
3560 CBaseEntity["GetNotSolidToWorld"] <- function(value){return GetProp("m_bNotSolidToWorld")}
3561
3562 CBaseEntity["SetExploitableByPlayer"] <- function(value){SetProp("m_iExploitableByPlayer", value.tointeger())}
3563 CBaseEntity["GetExploitableByPlayer"] <- function(value){return GetProp("m_iExploitableByPlayer")}
3564
3565
3566 CBaseEntity["SetPrecipType"] <- function(value){SetProp("m_nPrecipType", value.tointeger())}
3567 CBaseEntity["GetPrecipType"] <- function(value){return GetProp("m_nPrecipType")}
3568
3569 CBaseEntity["SetMinSpeed"] <- function(value){SetProp("m_minSpeed", value.tofloat())}
3570 CBaseEntity["GetMinSpeed"] <- function(value){return GetProp("m_minSpeed")}
3571
3572 CBaseEntity["SetMaxSpeed"] <- function(value){SetProp("m_maxSpeed", value.tofloat())}
3573 CBaseEntity["GetMaxSpeed"] <- function(value){return GetProp("m_maxSpeed")}
3574
3575
3576 CBaseEntity["SetDisabled"] <- function(value){SetProp("m_bDisabled", value.tointeger())}
3577 CBaseEntity["GetDisabled"] <- function(value){return GetProp("m_bDisabled")}
3578
3579
3580 CBaseEntity["SetClimbableNormal"] <- function(value){SetProp("m_climbableNormal", value)}
3581 CBaseEntity["GetClimbableNormal"] <- function(value){return GetProp("m_climbableNormal")}
3582
3583
3584 CBaseEntity["SetColor1"] <- function(value){SetProp("m_Color1", value.tointeger())}
3585 CBaseEntity["GetColor1"] <- function(value){return GetProp("m_Color1")}
3586
3587 CBaseEntity["SetColor2"] <- function(value){SetProp("m_Color2", value.tointeger())}
3588 CBaseEntity["GetColor2"] <- function(value){return GetProp("m_Color2")}
3589
3590 CBaseEntity["SetMaterialName"] <- function(value){SetProp("m_MaterialName", value.tostring())}
3591 CBaseEntity["GetMaterialName"] <- function(value){return GetProp("m_MaterialName")}
3592
3593 CBaseEntity["SetParticleDrawWidth"] <- function(value){SetProp("m_ParticleDrawWidth", value.tofloat())}
3594 CBaseEntity["GetParticleDrawWidth"] <- function(value){return GetProp("m_ParticleDrawWidth")}
3595
3596 CBaseEntity["SetParticleSpacingDistance"] <- function(value){SetProp("m_ParticleSpacingDistance", value.tofloat())}
3597 CBaseEntity["GetParticleSpacingDistance"] <- function(value){return GetProp("m_ParticleSpacingDistance")}
3598
3599 CBaseEntity["SetDensityRampSpeed"] <- function(value){SetProp("m_DensityRampSpeed", value.tofloat())}
3600 CBaseEntity["GetDensityRampSpeed"] <- function(value){return GetProp("m_DensityRampSpeed")}
3601
3602 CBaseEntity["SetRotationSpeed"] <- function(value){SetProp("m_RotationSpeed", value.tofloat())}
3603 CBaseEntity["GetRotationSpeed"] <- function(value){return GetProp("m_RotationSpeed")}
3604
3605 CBaseEntity["SetMovementSpeed"] <- function(value){SetProp("m_MovementSpeed", value.tofloat())}
3606 CBaseEntity["GetMovementSpeed"] <- function(value){return GetProp("m_MovementSpeed")}
3607
3608 CBaseEntity["SetDensity"] <- function(value){SetProp("m_Density", value.tofloat())}
3609 CBaseEntity["GetDensity"] <- function(value){return GetProp("m_Density")}
3610
3611 CBaseEntity["SetMaxDrawDistance"] <- function(value){SetProp("m_maxDrawDistance", value.tofloat())}
3612 CBaseEntity["GetMaxDrawDistance"] <- function(value){return GetProp("m_maxDrawDistance")}
3613
3614
3615 CBaseEntity["SetPlayerMountPositionTop"] <- function(value){SetProp("m_vecPlayerMountPositionTop", value)}
3616 CBaseEntity["GetPlayerMountPositionTop"] <- function(value){return GetProp("m_vecPlayerMountPositionTop")}
3617
3618 CBaseEntity["SetPlayerMountPositionBottom"] <- function(value){SetProp("m_vecPlayerMountPositionBottom", value)}
3619 CBaseEntity["GetPlayerMountPositionBottom"] <- function(value){return GetProp("m_vecPlayerMountPositionBottom")}
3620
3621 CBaseEntity["SetLadderDir"] <- function(value){SetProp("m_vecLadderDir", value)}
3622 CBaseEntity["GetLadderDir"] <- function(value){return GetProp("m_vecLadderDir")}
3623
3624 CBaseEntity["SetFakeLadder"] <- function(value){SetProp("m_bFakeLadder", value.tointeger())}
3625 CBaseEntity["GetFakeLadder"] <- function(value){return GetProp("m_bFakeLadder")}
3626
3627 CBaseEntity["SetDisabled"] <- function(value){SetProp("m_bDisabled", value.tointeger())}
3628 CBaseEntity["GetDisabled"] <- function(value){return GetProp("m_bDisabled")}
3629
3630
3631 CBaseEntity["SetCurrentMaxRagdollCount"] <- function(value){SetProp("m_iCurrentMaxRagdollCount", value.tointeger())}
3632 CBaseEntity["GetCurrentMaxRagdollCount"] <- function(value){return GetProp("m_iCurrentMaxRagdollCount")}
3633
3634 CBaseEntity["SetMaxRagdollCount"] <- function(value){SetProp("m_iMaxRagdollCount", value.tointeger())}
3635 CBaseEntity["GetMaxRagdollCount"] <- function(value){return GetProp("m_iMaxRagdollCount")}
3636
3637 CBaseEntity["SetSaveImportant"] <- function(value){SetProp("m_bSaveImportant", value.tointeger())}
3638 CBaseEntity["GetSaveImportant"] <- function(value){return GetProp("m_bSaveImportant")}
3639
3640
3641 CBaseEntity["SetActive"] <- function(value){SetProp("m_bActive", value.tointeger())}
3642 CBaseEntity["GetActive"] <- function(value){return GetProp("m_bActive")}
3643
3644 CBaseEntity["SetTotalScavengeItems"] <- function(value){SetProp("m_nTotalScavengeItems", value.tointeger())}
3645 CBaseEntity["GetTotalScavengeItems"] <- function(value){return GetProp("m_nTotalScavengeItems")}
3646
3647
3648 CBaseEntity["SetGibbedLimbForce"] <- function(value){SetProp("m_gibbedLimbForce", value)}
3649 CBaseEntity["GetGibbedLimbForce"] <- function(value){return GetProp("m_gibbedLimbForce")}
3650
3651 CBaseEntity["SetOriginalBody"] <- function(value){SetProp("m_originalBody", value.tointeger())}
3652 CBaseEntity["GetOriginalBody"] <- function(value){return GetProp("m_originalBody")}
3653
3654 CBaseEntity["SetMobRush"] <- function(value){SetProp("m_mobRush", value.tointeger())}
3655 CBaseEntity["GetMobRush"] <- function(value){return GetProp("m_mobRush")}
3656
3657 CBaseEntity["SetBurning"] <- function(value){SetProp("m_bIsBurning", value.tointeger())}
3658 CBaseEntity["GetBurning"] <- function(value){return GetProp("m_bIsBurning")}
3659
3660 CBaseEntity["SetRequestedWound1"] <- function(value){SetProp("m_iRequestedWound1", value.tointeger())}
3661 CBaseEntity["GetRequestedWound1"] <- function(value){return GetProp("m_iRequestedWound1")}
3662
3663 CBaseEntity["SetRequestedWound2"] <- function(value){SetProp("m_iRequestedWound2", value.tointeger())}
3664 CBaseEntity["GetRequestedWound2"] <- function(value){return GetProp("m_iRequestedWound2")}
3665
3666 CBaseEntity["SetFallenFlags"] <- function(value){SetProp("m_nFallenFlags", value.tointeger())}
3667 CBaseEntity["GetFallenFlags"] <- function(value){return GetProp("m_nFallenFlags")}
3668
3669
3670 CBaseEntity["SetFireXDelta"] <- function(value){SetProp("m_fireXDelta", value.tointeger())}
3671 CBaseEntity["GetFireXDelta"] <- function(value){return GetProp("m_fireXDelta", null, true)}
3672
3673 CBaseEntity["SetFireYDelta"] <- function(value){SetProp("m_fireYDelta", value.tointeger())}
3674 CBaseEntity["GetFireYDelta"] <- function(value){return GetProp("m_fireYDelta", null, true)}
3675
3676 CBaseEntity["SetFireZDelta"] <- function(value){SetProp("m_fireZDelta", value.tointeger())}
3677 CBaseEntity["GetFireZDelta"] <- function(value){return GetProp("m_fireZDelta", null, true)}
3678
3679 CBaseEntity["SetFireCount"] <- function(value){SetProp("m_fireCount", value.tointeger())}
3680 CBaseEntity["GetFireCount"] <- function(value){return GetProp("m_fireCount")}
3681
3682
3683 CBaseEntity["SetTextureFrameIndex"] <- function(value){SetProp("m_iTextureFrameIndex", value.tointeger())}
3684 CBaseEntity["GetTextureFrameIndex"] <- function(value){return GetProp("m_iTextureFrameIndex")}
3685
3686 CBaseEntity["SetOverlayID"] <- function(value){SetProp("m_iOverlayID", value.tointeger())}
3687 CBaseEntity["GetOverlayID"] <- function(value){return GetProp("m_iOverlayID")}
3688
3689
3690 CBaseEntity["SetOrder"] <- function(value){SetProp("m_order", value.tointeger())}
3691 CBaseEntity["GetOrder"] <- function(value){return GetProp("m_order")}
3692
3693 CBaseEntity["SetSurvivorName"] <- function(value){SetProp("m_iszSurvivorName", value.tostring())}
3694 CBaseEntity["GetSurvivorName"] <- function(value){return GetProp("m_iszSurvivorName")}
3695
3696 CBaseEntity["SetSurvivorIntroSequence"] <- function(value){SetProp("m_iszSurvivorIntroSequence", value.tostring())}
3697 CBaseEntity["GetSurvivorIntroSequence"] <- function(value){return GetProp("m_iszSurvivorIntroSequence")}
3698
3699 CBaseEntity["SetGamemode"] <- function(value){SetProp("m_iszGameMode", value.tostring())}
3700 CBaseEntity["GetGamemode"] <- function(value){return GetProp("m_iszGameMode")}
3701
3702 CBaseEntity["SetSurvivorConcept"] <- function(value){SetProp("m_iszSurvivorConcept", value.tostring())}
3703 CBaseEntity["GetSurvivorConcept"] <- function(value){return GetProp("m_iszSurvivorConcept")}
3704
3705 CBaseEntity["SetHideWeapons"] <- function(value){SetProp("m_bHideWeapons", value.tointeger())}
3706 CBaseEntity["GetHideWeapons"] <- function(value){return GetProp("m_bHideWeapons")}
3707
3708
3709 CBaseEntity["SetSurvivor"] <- function(value){SetProp("m_survivor", value.tointeger())}
3710 CBaseEntity["GetSurvivor"] <- function(value){return GetProp("m_survivor")}
3711
3712 CBaseEntity["SetRescueEyePos"] <- function(value){SetProp("m_rescueEyePos", value)}
3713 CBaseEntity["GetRescueEyePos"] <- function(value){return GetProp("m_rescueEyePos")}
3714
3715
3716 CBaseEntity["SetLoadingProgress"] <- function(value){SetProp("m_loadingProgress", value.tointeger())}
3717 CBaseEntity["GetLoadingProgress"] <- function(value){return GetProp("m_loadingProgress")}
3718
3719 CBaseEntity["SetUserID"] <- function(value){SetProp("m_userID", value.tointeger())}
3720 CBaseEntity["GetUserID"] <- function(value){return GetProp("m_userID")}
3721
3722 CBaseEntity["SetDeaths"] <- function(value){SetProp("m_deaths", value.tointeger())}
3723 CBaseEntity["GetDeaths"] <- function(value){return GetProp("m_deaths")}
3724
3725 CBaseEntity["SetScore"] <- function(value){SetProp("m_score", value.tointeger())}
3726 CBaseEntity["GetScore"] <- function(value){return GetProp("m_score")}
3727
3728 CBaseEntity["SetHasMolotov"] <- function(value){SetProp("m_hasMolotov", value.tointeger())}
3729 CBaseEntity["GetHasMolotov"] <- function(value){return GetProp("m_hasMolotov")}
3730
3731 CBaseEntity["SetHasGrenade"] <- function(value){SetProp("m_hasGrenade", value.tointeger())}
3732 CBaseEntity["GetHasGrenade"] <- function(value){return GetProp("m_hasGrenade")}
3733
3734 CBaseEntity["SetHasFirstAidKit"] <- function(value){SetProp("m_hasFirstAidKit", value.tointeger())}
3735 CBaseEntity["GetHasFirstAidKit"] <- function(value){return GetProp("m_hasFirstAidKit")}
3736
3737 CBaseEntity["SetHasPainPills"] <- function(value){SetProp("m_hasPainPills", value.tointeger())}
3738 CBaseEntity["GetHasPainPills"] <- function(value){return GetProp("m_hasPainPills")}
3739
3740 CBaseEntity["SetPrimaryWeaponID"] <- function(value){SetProp("m_primaryWeaponID", value.tointeger())}
3741 CBaseEntity["GetPrimaryWeaponID"] <- function(value){return GetProp("m_primaryWeaponID")}
3742
3743 CBaseEntity["SetSecondaryWeaponID"] <- function(value){SetProp("m_secondaryWeaponID", value.tointeger())}
3744 CBaseEntity["GetSecondaryWeaponID"] <- function(value){return GetProp("m_secondaryWeaponID")}
3745
3746
3747 CBaseEntity["SetSceneStringIndex"] <- function(value){SetProp("m_nSceneStringIndex", value.tointeger())}
3748 CBaseEntity["GetSceneStringIndex"] <- function(value){return GetProp("m_nSceneStringIndex")}
3749
3750 CBaseEntity["SetPlayingBack"] <- function(value){SetProp("m_bIsPlayingBack", value.tointeger())}
3751 CBaseEntity["GetPlayingBack"] <- function(value){return GetProp("m_bIsPlayingBack")}
3752
3753 CBaseEntity["SetPaused"] <- function(value){SetProp("m_bPaused", value.tointeger())}
3754 CBaseEntity["GetPaused"] <- function(value){return GetProp("m_bPaused")}
3755
3756 CBaseEntity["SetMultiplayer"] <- function(value){SetProp("m_bMultiplayer", value.tointeger())}
3757 CBaseEntity["GetMultiplayer"] <- function(value){return GetProp("m_bMultiplayer")}
3758
3759 CBaseEntity["SetForceClientTime"] <- function(value){SetProp("m_flForceClientTime", value.tofloat())}
3760 CBaseEntity["GetForceClientTime"] <- function(value){return GetProp("m_flForceClientTime")}
3761
3762 CBaseEntity["SetActorList"] <- function(value){SetPropEntity("m_hActorList", value)}
3763 CBaseEntity["GetActorList"] <- function(value){return GetPropEntity("m_hActorList", null, true)}
3764
3765 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_hOwner", value)}
3766 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_hOwner")}
3767
3768 CBaseEntity["SetHadOwner"] <- function(value){SetProp("m_bHadOwner", value.tointeger())}
3769 CBaseEntity["GetHadOwner"] <- function(value){return GetProp("m_bHadOwner")}
3770
3771 CBaseEntity["SetPostSpeakDelay"] <- function(value){SetProp("m_flPostSpeakDelay", value.tofloat())}
3772 CBaseEntity["GetPostSpeakDelay"] <- function(value){return GetProp("m_flPostSpeakDelay")}
3773
3774 CBaseEntity["SetPreDelay"] <- function(value){SetProp("m_flPreDelay", value.tofloat())}
3775 CBaseEntity["GetPreDelay"] <- function(value){return GetProp("m_flPreDelay")}
3776
3777 CBaseEntity["SetInstanceFilename"] <- function(value){SetProp("m_szInstanceFilename", value.tostring())}
3778 CBaseEntity["GetInstanceFilename"] <- function(value){return GetProp("m_szInstanceFilename")}
3779
3780 CBaseEntity["SetIsBackground"] <- function(value){SetProp("m_bIsBackground", value.tointeger())}
3781 CBaseEntity["GetIsBackground"] <- function(value){return GetProp("m_bIsBackground")}
3782
3783 CBaseEntity["SetSceneFile"] <- function(value){SetProp("m_iszSceneFile", value.tostring())}
3784 CBaseEntity["GetSceneFile"] <- function(value){return GetProp("m_iszSceneFile")}
3785
3786 CBaseEntity["SetResumeSceneFile"] <- function(value){SetProp("m_iszResumeSceneFile", value.tostring())}
3787 CBaseEntity["GetResumeSceneFile"] <- function(value){return GetProp("m_iszResumeSceneFile")}
3788
3789 CBaseEntity["SetWaitingForThisResumeScene"] <- function(value){SetPropEntity("m_hWaitingForThisResumeScene", value)}
3790 CBaseEntity["GetWaitingForThisResumeScene"] <- function(value){return GetPropEntity("m_hWaitingForThisResumeScene")}
3791
3792 CBaseEntity["SetWaitingForResumeScene"] <- function(value){SetProp("m_bWaitingForResumeScene", value.tointeger())}
3793 CBaseEntity["GetWaitingForResumeScene"] <- function(value){return GetProp("m_bWaitingForResumeScene")}
3794
3795 CBaseEntity["SetBusyActor"] <- function(value){SetPropEntity("m_BusyActor", value)}
3796 CBaseEntity["GetBusyActor"] <- function(value){return GetPropEntity("m_BusyActor")}
3797
3798 CBaseEntity["SetCurrentTime"] <- function(value){SetProp("m_flCurrentTime", value.tofloat())}
3799 CBaseEntity["GetCurrentTime"] <- function(value){return GetProp("m_flCurrentTime")}
3800
3801 CBaseEntity["SetFrameTime"] <- function(value){SetProp("m_flFrameTime", value.tofloat())}
3802 CBaseEntity["GetFrameTime"] <- function(value){return GetProp("m_flFrameTime")}
3803
3804 CBaseEntity["SetCancelAtNextInterrupt"] <- function(value){SetProp("m_bCancelAtNextInterrupt", value.tointeger())}
3805 CBaseEntity["GetCancelAtNextInterrupt"] <- function(value){return GetProp("m_bCancelAtNextInterrupt")}
3806
3807 CBaseEntity["SetPitch"] <- function(value){SetProp("m_fPitch", value.tofloat())}
3808 CBaseEntity["GetPitch"] <- function(value){return GetProp("m_fPitch")}
3809
3810 CBaseEntity["SetAutomated"] <- function(value){SetProp("m_bAutomated", value.tointeger())}
3811 CBaseEntity["GetAutomated"] <- function(value){return GetProp("m_bAutomated")}
3812
3813 CBaseEntity["SetAutomatedAction"] <- function(value){SetProp("m_nAutomatedAction", value.tointeger())}
3814 CBaseEntity["GetAutomatedAction"] <- function(value){return GetProp("m_nAutomatedAction")}
3815
3816 CBaseEntity["SetAutomationDelay"] <- function(value){SetProp("m_flAutomationDelay", value.tofloat())}
3817 CBaseEntity["GetAutomationDelay"] <- function(value){return GetProp("m_flAutomationDelay")}
3818
3819 CBaseEntity["SetAutomationTime"] <- function(value){SetProp("m_flAutomationTime", value.tofloat())}
3820 CBaseEntity["GetAutomationTime"] <- function(value){return GetProp("m_flAutomationTime")}
3821
3822 CBaseEntity["SetPausedViaInput"] <- function(value){SetProp("m_bPausedViaInput", value.tointeger())}
3823 CBaseEntity["GetPausedViaInput"] <- function(value){return GetProp("m_bPausedViaInput")}
3824
3825 CBaseEntity["SetWaitingForActor"] <- function(value){SetProp("m_bWaitingForActor", value.tointeger())}
3826 CBaseEntity["GetWaitingForActor"] <- function(value){return GetProp("m_bWaitingForActor")}
3827
3828 CBaseEntity["SetWaitingForInterrupt"] <- function(value){SetProp("m_bWaitingForInterrupt", value.tointeger())}
3829 CBaseEntity["GetWaitingForInterrupt"] <- function(value){return GetProp("m_bWaitingForInterrupt")}
3830
3831 CBaseEntity["SetInterruptedActorsScenes"] <- function(value){SetProp("m_bInterruptedActorsScenes", value.tointeger())}
3832 CBaseEntity["GetInterruptedActorsScenes"] <- function(value){return GetProp("m_bInterruptedActorsScenes")}
3833
3834 CBaseEntity["SetBreakOnNonIdle"] <- function(value){SetProp("m_bBreakOnNonIdle", value.tointeger())}
3835 CBaseEntity["GetBreakOnNonIdle"] <- function(value){return GetProp("m_bBreakOnNonIdle")}
3836
3837 CBaseEntity["SetInterruptCount"] <- function(value){SetProp("m_nInterruptCount", value.tointeger())}
3838 CBaseEntity["GetInterruptCount"] <- function(value){return GetProp("m_nInterruptCount")}
3839
3840 CBaseEntity["SetInterrupted"] <- function(value){SetProp("m_bInterrupted", value.tointeger())}
3841 CBaseEntity["GetInterrupted"] <- function(value){return GetProp("m_bInterrupted")}
3842
3843 CBaseEntity["SetInterruptScene"] <- function(value){SetPropEntity("m_hInterruptScene", value)}
3844 CBaseEntity["GetInterruptScene"] <- function(value){return GetPropEntity("m_hInterruptScene")}
3845
3846 CBaseEntity["SetCompletedEarly"] <- function(value){SetProp("m_bCompletedEarly", value.tointeger())}
3847 CBaseEntity["GetCompletedEarly"] <- function(value){return GetProp("m_bCompletedEarly")}
3848
3849 CBaseEntity["SetInterruptSceneFinished"] <- function(value){SetProp("m_bInterruptSceneFinished", value.tointeger())}
3850 CBaseEntity["GetInterruptSceneFinished"] <- function(value){return GetProp("m_bInterruptSceneFinished")}
3851
3852 CBaseEntity["SetGenerated"] <- function(value){SetProp("m_bGenerated", value.tointeger())}
3853 CBaseEntity["GetGenerated"] <- function(value){return GetProp("m_bGenerated")}
3854
3855 CBaseEntity["SetSoundName"] <- function(value){SetProp("m_iszSoundName", value.tostring())}
3856 CBaseEntity["GetSoundName"] <- function(value){return GetProp("m_iszSoundName")}
3857
3858 CBaseEntity["SetActor"] <- function(value){SetPropEntity("m_hActor", value)}
3859 CBaseEntity["GetActor"] <- function(value){return GetPropEntity("m_hActor")}
3860
3861
3862 CBaseEntity["SetStartPoint"] <- function(value){SetPropEntity("m_hStartPoint", value)}
3863 CBaseEntity["GetStartPoint"] <- function(value){return GetPropEntity("m_hStartPoint")}
3864
3865 CBaseEntity["SetEndPoint"] <- function(value){SetPropEntity("m_hEndPoint", value)}
3866 CBaseEntity["GetEndPoint"] <- function(value){return GetPropEntity("m_hEndPoint")}
3867
3868 CBaseEntity["SetStartAttachment"] <- function(value){SetProp("m_iStartAttachment", value.tointeger())}
3869 CBaseEntity["GetStartAttachment"] <- function(value){return GetProp("m_iStartAttachment")}
3870
3871 CBaseEntity["SetEndAttachment"] <- function(value){SetProp("m_iEndAttachment", value.tointeger())}
3872 CBaseEntity["GetEndAttachment"] <- function(value){return GetProp("m_iEndAttachment")}
3873
3874 CBaseEntity["SetSlack"] <- function(value){SetProp("m_Slack", value.tointeger())}
3875 CBaseEntity["GetSlack"] <- function(value){return GetProp("m_Slack")}
3876
3877 CBaseEntity["SetRopeLength"] <- function(value){SetProp("m_RopeLength", value.tointeger())}
3878 CBaseEntity["GetRopeLength"] <- function(value){return GetProp("m_RopeLength")}
3879
3880 CBaseEntity["SetLockedPoints"] <- function(value){SetProp("m_fLockedPoints", value.tointeger())}
3881 CBaseEntity["GetLockedPoints"] <- function(value){return GetProp("m_fLockedPoints")}
3882
3883 CBaseEntity["SetChangeCount"] <- function(value){SetProp("m_nChangeCount", value.tointeger())}
3884 CBaseEntity["GetChangeCount"] <- function(value){return GetProp("m_nChangeCount")}
3885
3886 CBaseEntity["SetRopeFlags"] <- function(value){SetProp("m_RopeFlags", value.tointeger())}
3887 CBaseEntity["GetRopeFlags"] <- function(value){return GetProp("m_RopeFlags")}
3888
3889 CBaseEntity["SetSegments"] <- function(value){SetProp("m_nSegments", value.tointeger())}
3890 CBaseEntity["GetSegments"] <- function(value){return GetProp("m_nSegments")}
3891
3892 CBaseEntity["SetConstrainBetweenEndpoints"] <- function(value){SetProp("m_bConstrainBetweenEndpoints", value.tointeger())}
3893 CBaseEntity["GetConstrainBetweenEndpoints"] <- function(value){return GetProp("m_bConstrainBetweenEndpoints")}
3894
3895 CBaseEntity["SetRopeMaterialModelIndex"] <- function(value){SetProp("m_iRopeMaterialModelIndex", value.tointeger())}
3896 CBaseEntity["GetRopeMaterialModelIndex"] <- function(value){return GetProp("m_iRopeMaterialModelIndex")}
3897
3898 CBaseEntity["SetSubdiv"] <- function(value){SetProp("m_Subdiv", value.tointeger())}
3899 CBaseEntity["GetSubdiv"] <- function(value){return GetProp("m_Subdiv")}
3900
3901 CBaseEntity["SetTextureScale"] <- function(value){SetProp("m_TextureScale", value.tofloat())}
3902 CBaseEntity["GetTextureScale"] <- function(value){return GetProp("m_TextureScale")}
3903
3904 CBaseEntity["SetWidth"] <- function(value){SetProp("m_Width", value.tofloat())}
3905 CBaseEntity["GetWidth"] <- function(value){return GetProp("m_Width")}
3906
3907 CBaseEntity["SetScrollSpeed"] <- function(value){SetProp("m_flScrollSpeed", value.tofloat())}
3908 CBaseEntity["GetScrollSpeed"] <- function(value){return GetProp("m_flScrollSpeed")}
3909
3910 CBaseEntity["SetNextLinkName"] <- function(value){SetProp("m_iNextLinkName", value.tostring())}
3911 CBaseEntity["GetNextLinkName"] <- function(value){return GetProp("m_iNextLinkName")}
3912
3913 CBaseEntity["SetRopeMaterialModel"] <- function(value){SetProp("m_strRopeMaterialModel", value.tostring())}
3914 CBaseEntity["GetRopeMaterialModel"] <- function(value){return GetProp("m_strRopeMaterialModel")}
3915
3916 CBaseEntity["SetCreatedFromMapFile"] <- function(value){SetProp("m_bCreatedFromMapFile", value.tointeger())}
3917 CBaseEntity["GetCreatedFromMapFile"] <- function(value){return GetProp("m_bCreatedFromMapFile")}
3918
3919 CBaseEntity["SetStartPointValid"] <- function(value){SetProp("m_bStartPointValid", value.tointeger())}
3920 CBaseEntity["GetStartPointValid"] <- function(value){return GetProp("m_bStartPointValid")}
3921
3922 CBaseEntity["SetEndPointValid"] <- function(value){SetProp("m_bEndPointValid", value.tointeger())}
3923 CBaseEntity["GetEndPointValid"] <- function(value){return GetProp("m_bEndPointValid")}
3924
3925
3926 CBaseEntity["SetFlags"] <- function(value){SetProp("m_Flags", value.tointeger())}
3927 CBaseEntity["GetFlags"] <- function(value){return GetProp("m_Flags")}
3928
3929 CBaseEntity["SetLightStyle"] <- function(value){SetProp("m_LightStyle", value.tointeger())}
3930 CBaseEntity["GetLightStyle"] <- function(value){return GetProp("m_LightStyle")}
3931
3932 CBaseEntity["SetRadius"] <- function(value){SetProp("m_Radius", value.tofloat())}
3933 CBaseEntity["GetRadius"] <- function(value){return GetProp("m_Radius")}
3934
3935 CBaseEntity["SetExponent"] <- function(value){SetProp("m_Exponent", value.tointeger())}
3936 CBaseEntity["GetExponent"] <- function(value){return GetProp("m_Exponent")}
3937
3938 CBaseEntity["SetInnerAngle"] <- function(value){SetProp("m_InnerAngle", value.tofloat())}
3939 CBaseEntity["GetInnerAngle"] <- function(value){return GetProp("m_InnerAngle")}
3940
3941 CBaseEntity["SetOuterAngle"] <- function(value){SetProp("m_OuterAngle", value.tofloat())}
3942 CBaseEntity["GetOuterAngle"] <- function(value){return GetProp("m_OuterAngle")}
3943
3944 CBaseEntity["SetSpotRadius"] <- function(value){SetProp("m_SpotRadius", value.tofloat())}
3945 CBaseEntity["GetSpotRadius"] <- function(value){return GetProp("m_SpotRadius")}
3946
3947 CBaseEntity["SetActualFlags"] <- function(value){SetProp("m_ActualFlags", value.tointeger())}
3948 CBaseEntity["GetActualFlags"] <- function(value){return GetProp("m_ActualFlags")}
3949
3950 CBaseEntity["SetOn"] <- function(value){SetProp("m_On", value.tointeger())}
3951 CBaseEntity["GetOn"] <- function(value){return GetProp("m_On")}
3952
3953
3954 CBaseEntity["SetMaterialName"] <- function(value){SetProp("m_szMaterialName", value.tostring())}
3955 CBaseEntity["GetMaterialName"] <- function(value){return GetProp("m_szMaterialName")}
3956
3957 CBaseEntity["SetMaterialVar"] <- function(value){SetProp("m_szMaterialVar", value.tostring())}
3958 CBaseEntity["GetMaterialVar"] <- function(value){return GetProp("m_szMaterialVar")}
3959
3960 CBaseEntity["SetMaterialVarValue"] <- function(value){SetProp("m_szMaterialVarValue", value.tostring())}
3961 CBaseEntity["GetMaterialVarValue"] <- function(value){return GetProp("m_szMaterialVarValue")}
3962
3963 CBaseEntity["SetFrameStart"] <- function(value){SetProp("m_iFrameStart", value.tointeger())}
3964 CBaseEntity["GetFrameStart"] <- function(value){return GetProp("m_iFrameStart")}
3965
3966 CBaseEntity["SetFrameEnd"] <- function(value){SetProp("m_iFrameEnd", value.tointeger())}
3967 CBaseEntity["GetFrameEnd"] <- function(value){return GetProp("m_iFrameEnd")}
3968
3969 CBaseEntity["SetWrap"] <- function(value){SetProp("m_bWrap", value.tointeger())}
3970 CBaseEntity["GetWrap"] <- function(value){return GetProp("m_bWrap")}
3971
3972 CBaseEntity["SetFramerate"] <- function(value){SetProp("m_flFramerate", value.tofloat())}
3973 CBaseEntity["GetFramerate"] <- function(value){return GetProp("m_flFramerate")}
3974
3975 CBaseEntity["SetNewAnimCommandsSemaphore"] <- function(value){SetProp("m_bNewAnimCommandsSemaphore", value.tointeger())}
3976 CBaseEntity["GetNewAnimCommandsSemaphore"] <- function(value){return GetProp("m_bNewAnimCommandsSemaphore")}
3977
3978 CBaseEntity["SetFloatLerpStartValue"] <- function(value){SetProp("m_flFloatLerpStartValue", value.tofloat())}
3979 CBaseEntity["GetFloatLerpStartValue"] <- function(value){return GetProp("m_flFloatLerpStartValue")}
3980
3981 CBaseEntity["SetFloatLerpEndValue"] <- function(value){SetProp("m_flFloatLerpEndValue", value.tofloat())}
3982 CBaseEntity["GetFloatLerpEndValue"] <- function(value){return GetProp("m_flFloatLerpEndValue")}
3983
3984 CBaseEntity["SetFloatLerpTransitionTime"] <- function(value){SetProp("m_flFloatLerpTransitionTime", value.tofloat())}
3985 CBaseEntity["GetFloatLerpTransitionTime"] <- function(value){return GetProp("m_flFloatLerpTransitionTime")}
3986
3987 CBaseEntity["SetModifyMode"] <- function(value){SetProp("m_nModifyMode", value.tointeger())}
3988 CBaseEntity["GetModifyMode"] <- function(value){return GetProp("m_nModifyMode")}
3989
3990
3991 CBaseEntity["SetModelIndex"] <- function(value){SetProp("m_modelIndex", value.tointeger())}
3992 CBaseEntity["GetModelIndex"] <- function(value){return GetProp("m_modelIndex")}
3993
3994 CBaseEntity["SetSolidIndex"] <- function(value){SetProp("m_solidIndex", value.tointeger())}
3995 CBaseEntity["GetSolidIndex"] <- function(value){return GetProp("m_solidIndex")}
3996
3997 CBaseEntity["SetPhysicsBone"] <- function(value){SetProp("m_physicsBone", value.tostring())}
3998 CBaseEntity["GetPhysicsBone"] <- function(value){return GetProp("m_physicsBone")}
3999
4000 CBaseEntity["SetHitGroup"] <- function(value){SetProp("m_hitGroup", value.tointeger())}
4001 CBaseEntity["GetHitGroup"] <- function(value){return GetProp("m_hitGroup")}
4002
4003
4004 CBaseEntity["SetAwake"] <- function(value){SetProp("m_bAwake", value.tointeger())}
4005 CBaseEntity["GetAwake"] <- function(value){return GetProp("m_bAwake")}
4006
4007 CBaseEntity["SetHasTankGlow"] <- function(value){SetProp("m_hasTankGlow", value.tointeger())}
4008 CBaseEntity["GetHasTankGlow"] <- function(value){return GetProp("m_hasTankGlow")}
4009
4010 CBaseEntity["SetCarryable"] <- function(value){SetProp("m_isCarryable", value.tointeger())}
4011 CBaseEntity["GetCarryable"] <- function(value){return GetProp("m_isCarryable")}
4012
4013
4014 CBaseEntity["SetRagAngles"] <- function(value){SetProp("m_ragAngles", value)}
4015 CBaseEntity["GetRagAngles"] <- function(value){return GetProp("m_ragAngles", null, true)}
4016
4017 CBaseEntity["SetRagPos"] <- function(value){SetProp("m_ragPos", value)}
4018 CBaseEntity["GetRagPos"] <- function(value){return GetProp("m_ragPos", null, true)}
4019
4020 CBaseEntity["SetUnragdoll"] <- function(value){SetPropEntity("m_hUnragdoll", value)}
4021 CBaseEntity["GetUnragdoll"] <- function(value){return GetPropEntity("m_hUnragdoll")}
4022
4023 CBaseEntity["SetBlendWeight"] <- function(value){SetProp("m_flBlendWeight", value.tofloat())}
4024 CBaseEntity["GetBlendWeight"] <- function(value){return GetProp("m_flBlendWeight")}
4025
4026 CBaseEntity["SetOverlaySequence"] <- function(value){SetProp("m_nOverlaySequence", value.tointeger())}
4027 CBaseEntity["GetOverlaySequence"] <- function(value){return GetProp("m_nOverlaySequence")}
4028
4029 CBaseEntity["SetLastUpdateTickCount"] <- function(value){SetProp("m_lastUpdateTickCount", value.tointeger())}
4030 CBaseEntity["GetLastUpdateTickCount"] <- function(value){return GetProp("m_lastUpdateTickCount")}
4031
4032 CBaseEntity["SetAllAsleep"] <- function(value){SetProp("m_allAsleep", value.tointeger())}
4033 CBaseEntity["GetAllAsleep"] <- function(value){return GetProp("m_allAsleep")}
4034
4035 CBaseEntity["SetDamageEntity"] <- function(value){SetPropEntity("m_hDamageEntity", value)}
4036 CBaseEntity["GetDamageEntity"] <- function(value){return GetPropEntity("m_hDamageEntity")}
4037
4038 CBaseEntity["SetKiller"] <- function(value){SetPropEntity("m_hKiller", value)}
4039 CBaseEntity["GetKiller"] <- function(value){return GetPropEntity("m_hKiller")}
4040
4041 CBaseEntity["SetStartDisabled"] <- function(value){SetProp("m_bStartDisabled", value.tointeger())}
4042 CBaseEntity["GetStartDisabled"] <- function(value){return GetProp("m_bStartDisabled")}
4043
4044
4045 CBaseEntity["SetPing"] <- function(ent, value){
4046 if(ent.GetClassname() != "player" || !ent.IsValid()){
4047 return false
4048 }
4049
4050 SetProp("m_iPing", value.tointeger(), ent.GetEntityIndex())
4051 }
4052 CBaseEntity["GetPing"] <- function(ent){
4053 if(ent.GetClassname() != "player" || !ent.IsValid()){
4054 return
4055 }
4056
4057 return GetProp("m_iPing", ent.GetEntityIndex())
4058 }
4059
4060 CBaseEntity["SetScore"] <- function(ent, value){
4061 if(ent.GetClassname() != "player" || !ent.IsValid()){
4062 return false
4063 }
4064
4065 SetProp("m_iScore", value.tointeger(), ent.GetEntityIndex())
4066 }
4067 CBaseEntity["GetScore"] <- function(ent){
4068 if(ent.GetClassname() != "player" || !ent.IsValid()){
4069 return
4070 }
4071
4072 return GetProp("m_iScore", ent.GetEntityIndex())
4073 }
4074
4075 CBaseEntity["SetTankTickets"] <- function(ent, value){
4076 if(ent.GetClassname() != "player" || !ent.IsValid()){
4077 return false
4078 }
4079
4080 SetProp("m_iTankTickets", value.tointeger(), ent.GetEntityIndex())
4081 }
4082 CBaseEntity["GetTankTickets"] <- function(ent){
4083 if(ent.GetClassname() != "player" || !ent.IsValid()){
4084 return
4085 }
4086
4087 return GetProp("m_iTankTickets", ent.GetEntityIndex())
4088 }
4089
4090 CBaseEntity["SetDeaths"] <- function(ent, value){
4091 if(ent.GetClassname() != "player" || !ent.IsValid()){
4092 return false
4093 }
4094
4095 SetProp("m_iDeaths", value.tointeger(), ent.GetEntityIndex())
4096 }
4097 CBaseEntity["GetDeaths"] <- function(ent){
4098 if(ent.GetClassname() != "player" || !ent.IsValid()){
4099 return
4100 }
4101
4102 return GetProp("m_iDeaths", ent.GetEntityIndex())
4103 }
4104
4105 CBaseEntity["SetConnected"] <- function(ent, value){
4106 if(ent.GetClassname() != "player" || !ent.IsValid()){
4107 return false
4108 }
4109
4110 SetProp("m_bConnected", value.tointeger(), ent.GetEntityIndex())
4111 }
4112 CBaseEntity["GetConnected"] <- function(ent){
4113 if(ent.GetClassname() != "player" || !ent.IsValid()){
4114 return
4115 }
4116
4117 return GetProp("m_bConnected", ent.GetEntityIndex())
4118 }
4119
4120
4121 CBaseEntity["SetActive"] <- function(value){SetProp("m_bActive", value.tointeger())}
4122 CBaseEntity["GetActive"] <- function(value){return GetProp("m_bActive")}
4123
4124 CBaseEntity["SetCommentaryFile"] <- function(value){SetProp("m_iszCommentaryFile", value.tostring())}
4125 CBaseEntity["GetCommentaryFile"] <- function(value){return GetProp("m_iszCommentaryFile")}
4126
4127 CBaseEntity["SetCommentaryFileNoHDR"] <- function(value){SetProp("m_iszCommentaryFileNoHDR", value.tostring())}
4128 CBaseEntity["GetCommentaryFileNoHDR"] <- function(value){return GetProp("m_iszCommentaryFileNoHDR")}
4129
4130 CBaseEntity["SetStartTime"] <- function(value){SetProp("m_flStartTime", value.tofloat())}
4131 CBaseEntity["GetStartTime"] <- function(value){return GetProp("m_flStartTime")}
4132
4133 CBaseEntity["SetSpeakers"] <- function(value){SetProp("m_iszSpeakers", value.tostring())}
4134 CBaseEntity["GetSpeakers"] <- function(value){return GetProp("m_iszSpeakers")}
4135
4136 CBaseEntity["SetNodeNumber"] <- function(value){SetProp("m_iNodeNumber", value.tointeger())}
4137 CBaseEntity["GetNodeNumber"] <- function(value){return GetProp("m_iNodeNumber")}
4138
4139 CBaseEntity["SetNodeNumberMax"] <- function(value){SetProp("m_iNodeNumberMax", value.tointeger())}
4140 CBaseEntity["GetNodeNumberMax"] <- function(value){return GetProp("m_iNodeNumberMax")}
4141
4142 CBaseEntity["SetViewPosition"] <- function(value){SetPropEntity("m_hViewPosition", value)}
4143 CBaseEntity["GetViewPosition"] <- function(value){return GetPropEntity("m_hViewPosition")}
4144
4145 CBaseEntity["SetPreCommands"] <- function(value){SetProp("m_iszPreCommands", value.tostring())}
4146 CBaseEntity["GetPreCommands"] <- function(value){return GetProp("m_iszPreCommands")}
4147
4148 CBaseEntity["SetPostCommands"] <- function(value){SetProp("m_iszPostCommands", value.tostring())}
4149 CBaseEntity["GetPostCommands"] <- function(value){return GetProp("m_iszPostCommands")}
4150
4151 CBaseEntity["SetViewTarget"] <- function(value){SetPropEntity("m_hViewTarget", value)}
4152 CBaseEntity["GetViewTarget"] <- function(value){return GetPropEntity("m_hViewTarget")}
4153
4154 CBaseEntity["SetViewTargetAngles"] <- function(value){SetPropEntity("m_hViewTargetAngles", value)}
4155 CBaseEntity["GetViewTargetAngles"] <- function(value){return GetPropEntity("m_hViewTargetAngles")}
4156
4157 CBaseEntity["SetViewPositionMover"] <- function(value){SetPropEntity("m_hViewPositionMover", value)}
4158 CBaseEntity["GetViewPositionMover"] <- function(value){return GetPropEntity("m_hViewPositionMover")}
4159
4160 CBaseEntity["SetPreventMovement"] <- function(value){SetProp("m_bPreventMovement", value.tointeger())}
4161 CBaseEntity["GetPreventMovement"] <- function(value){return GetProp("m_bPreventMovement")}
4162
4163 CBaseEntity["SetUnderCrosshair"] <- function(value){SetProp("m_bUnderCrosshair", value.tointeger())}
4164 CBaseEntity["GetUnderCrosshair"] <- function(value){return GetProp("m_bUnderCrosshair")}
4165
4166 CBaseEntity["SetUnstoppable"] <- function(value){SetProp("m_bUnstoppable", value.tointeger())}
4167 CBaseEntity["GetUnstoppable"] <- function(value){return GetProp("m_bUnstoppable")}
4168
4169 CBaseEntity["SetFinishedTime"] <- function(value){SetProp("m_flFinishedTime", value.tofloat())}
4170 CBaseEntity["GetFinishedTime"] <- function(value){return GetProp("m_flFinishedTime")}
4171
4172 CBaseEntity["SetFinishOrigin"] <- function(value){SetProp("m_vecFinishOrigin", value)}
4173 CBaseEntity["GetFinishOrigin"] <- function(value){return GetProp("m_vecFinishOrigin")}
4174
4175 CBaseEntity["SetOriginalAngles"] <- function(value){SetProp("m_vecOriginalAngles", value)}
4176 CBaseEntity["GetOriginalAngles"] <- function(value){return GetProp("m_vecOriginalAngles")}
4177
4178 CBaseEntity["SetFinishAngles"] <- function(value){SetProp("m_vecFinishAngles", value)}
4179 CBaseEntity["GetFinishAngles"] <- function(value){return GetProp("m_vecFinishAngles")}
4180
4181 CBaseEntity["SetPreventChangesWhileMoving"] <- function(value){SetProp("m_bPreventChangesWhileMoving", value.tointeger())}
4182 CBaseEntity["GetPreventChangesWhileMoving"] <- function(value){return GetProp("m_bPreventChangesWhileMoving")}
4183
4184 CBaseEntity["SetDisabled"] <- function(value){SetProp("m_bDisabled", value.tointeger())}
4185 CBaseEntity["GetDisabled"] <- function(value){return GetProp("m_bDisabled")}
4186
4187 CBaseEntity["SetTeleportOrigin"] <- function(value){SetProp("m_vecTeleportOrigin", value)}
4188 CBaseEntity["GetTeleportOrigin"] <- function(value){return GetProp("m_vecTeleportOrigin")}
4189
4190
4191 CBaseEntity["SetUseActionOwner"] <- function(value){SetPropEntity("m_useActionOwner", value)}
4192 CBaseEntity["GetUseActionOwner"] <- function(value){return GetPropEntity("m_useActionOwner")}
4193
4194 CBaseEntity["SetGasNozzle"] <- function(value){SetPropEntity("m_hGasNozzle", value)}
4195 CBaseEntity["GetGasNozzle"] <- function(value){return GetPropEntity("m_hGasNozzle")}
4196
4197 CBaseEntity["SetGasNozzleName"] <- function(value){SetProp("m_sGasNozzleName", value.tostring())}
4198 CBaseEntity["GetGasNozzleName"] <- function(value){return GetProp("m_sGasNozzleName")}
4199
4200
4201 CBaseEntity["SetUseString"] <- function(value){SetProp("m_sUseString", value.tostring())}
4202 CBaseEntity["GetUseString"] <- function(value){return GetProp("m_sUseString")}
4203
4204 CBaseEntity["SetUseSubstring"] <- function(value){SetProp("m_sUseSubString", value.tostring())}
4205 CBaseEntity["GetUseSubstring"] <- function(value){return GetProp("m_sUseSubString")}
4206
4207 CBaseEntity["SetPreviousProgressPercent"] <- function(value){SetProp("m_flPreviousProgressPercent", value.tofloat())}
4208 CBaseEntity["GetPreviousProgressPercent"] <- function(value){return GetProp("m_flPreviousProgressPercent")}
4209
4210 CBaseEntity["SetCanShowBuildPanel"] <- function(value){SetProp("m_bCanShowBuildPanel", value.tointeger())}
4211 CBaseEntity["GetCanShowBuildPanel"] <- function(value){return GetProp("m_bCanShowBuildPanel")}
4212
4213 CBaseEntity["SetUseModelName"] <- function(value){SetProp("m_sUseModelName", value.tostring())}
4214 CBaseEntity["GetUseModelName"] <- function(value){return GetProp("m_sUseModelName")}
4215
4216 CBaseEntity["SetDuration"] <- function(value){SetProp("m_flDuration", value.tofloat())}
4217 CBaseEntity["GetDuration"] <- function(value){return GetProp("m_flDuration")}
4218
4219
4220 CBaseEntity["SetLocalContrastStrength"] <- function(value){SetProp("m_fLocalContrastStrength", value.tofloat())}
4221 CBaseEntity["GetLocalContrastStrength"] <- function(value){return GetProp("m_fLocalContrastStrength")}
4222
4223 CBaseEntity["SetLocalContrastEdgeStrength"] <- function(value){SetProp("m_fLocalContrastEdgeStrength", value.tofloat())}
4224 CBaseEntity["GetLocalContrastEdgeStrength"] <- function(value){return GetProp("m_fLocalContrastEdgeStrength")}
4225
4226 CBaseEntity["SetVignetteStart"] <- function(value){SetProp("m_fVignetteStart", value.tofloat())}
4227 CBaseEntity["GetVignetteStart"] <- function(value){return GetProp("m_fVignetteStart")}
4228
4229 CBaseEntity["SetVignetteEnd"] <- function(value){SetProp("m_fVignetteEnd", value.tofloat())}
4230 CBaseEntity["GetVignetteEnd"] <- function(value){return GetProp("m_fVignetteEnd")}
4231
4232 CBaseEntity["SetVignetteBlurStrength"] <- function(value){SetProp("m_fVignetteBlurStrength", value.tofloat())}
4233 CBaseEntity["GetVignetteBlurStrength"] <- function(value){return GetProp("m_fVignetteBlurStrength")}
4234
4235 CBaseEntity["SetFadeToBlackStrength"] <- function(value){SetProp("m_fFadeToBlackStrength", value.tofloat())}
4236 CBaseEntity["GetFadeToBlackStrength"] <- function(value){return GetProp("m_fFadeToBlackStrength")}
4237
4238 CBaseEntity["SetGrainStrength"] <- function(value){SetProp("m_fGrainStrength", value.tofloat())}
4239 CBaseEntity["GetGrainStrength"] <- function(value){return GetProp("m_fGrainStrength")}
4240
4241 CBaseEntity["SetTopVignetteStrength"] <- function(value){SetProp("m_fTopVignetteStrength", value.tofloat())}
4242 CBaseEntity["GetTopVignetteStrength"] <- function(value){return GetProp("m_fTopVignetteStrength")}
4243
4244 CBaseEntity["SetFadeTime"] <- function(value){SetProp("m_fFadeTime", value.tofloat())}
4245 CBaseEntity["GetFadeTime"] <- function(value){return GetProp("m_fFadeTime")}
4246
4247 CBaseEntity["SetMaster"] <- function(value){SetProp("m_bMaster", value.tointeger())}
4248 CBaseEntity["GetMaster"] <- function(value){return GetProp("m_bMaster")}
4249
4250
4251 CBaseEntity["SetUsed"] <- function(value){SetProp("m_isUsed", value.tointeger())}
4252 CBaseEntity["GetUsed"] <- function(value){return GetProp("m_isUsed")}
4253
4254 CBaseEntity["SetPillCount"] <- function(value){SetProp("m_pillCount", value.tointeger())}
4255 CBaseEntity["GetPillCount"] <- function(value){return GetProp("m_pillCount")}
4256
4257
4258 CBaseEntity["SetInitialAngles"] <- function(value){SetProp("m_initialAngles", value)}
4259 CBaseEntity["GetInitialAngles"] <- function(value){return GetProp("m_initialAngles")}
4260
4261 CBaseEntity["SetOwner"] <- function(value){SetPropEntity("m_owner", value)}
4262 CBaseEntity["GetOwner"] <- function(value){return GetPropEntity("m_owner")}
4263
4264 CBaseEntity["SetMaxYaw"] <- function(value){SetProp("m_maxYaw", value.tofloat())}
4265 CBaseEntity["GetMaxYaw"] <- function(value){return GetProp("m_maxYaw")}
4266
4267 CBaseEntity["SetMaxPitch"] <- function(value){SetProp("m_maxPitch", value.tofloat())}
4268 CBaseEntity["GetMaxPitch"] <- function(value){return GetProp("m_maxPitch")}
4269
4270 CBaseEntity["SetMinPitch"] <- function(value){SetProp("m_minPitch", value.tofloat())}
4271 CBaseEntity["GetMinPitch"] <- function(value){return GetProp("m_minPitch")}
4272
4273 CBaseEntity["SetFiring"] <- function(value){SetProp("m_firing", value.tointeger())}
4274 CBaseEntity["GetFiring"] <- function(value){return GetProp("m_firing")}
4275
4276 CBaseEntity["SetOverheated"] <- function(value){SetProp("m_overheated", value.tointeger())}
4277 CBaseEntity["GetOverheated"] <- function(value){return GetProp("m_overheated")}
4278
4279 CBaseEntity["SetHeat"] <- function(value){SetProp("m_heat", value.tofloat())}
4280 CBaseEntity["GetHeat"] <- function(value){return GetProp("m_heat")}
4281
4282
4283 CBaseEntity["SetBoneIndexAttached"] <- function(value){SetProp("m_boneIndexAttached", value.tointeger())}
4284 CBaseEntity["GetBoneIndexAttached"] <- function(value){return GetProp("m_boneIndexAttached")}
4285
4286 CBaseEntity["SetRagdollAttachedObjectIndex"] <- function(value){SetProp("m_ragdollAttachedObjectIndex", value.tointeger())}
4287 CBaseEntity["GetRagdollAttachedObjectIndex"] <- function(value){return GetProp("m_ragdollAttachedObjectIndex")}
4288
4289 CBaseEntity["SetAttachmentPointBoneSpace"] <- function(value){SetProp("m_attachmentPointBoneSpace", value)}
4290 CBaseEntity["GetAttachmentPointBoneSpace"] <- function(value){return GetProp("m_attachmentPointBoneSpace")}
4291
4292 CBaseEntity["SetAttachmentPointRagdollSpace"] <- function(value){SetProp("m_attachmentPointRagdollSpace", value)}
4293 CBaseEntity["GetAttachmentPointRagdollSpace"] <- function(value){return GetProp("m_attachmentPointRagdollSpace")}
4294
4295 CBaseEntity["SetShouldDetach"] <- function(value){SetProp("m_bShouldDetach", value.tointeger())}
4296 CBaseEntity["GetShouldDetach"] <- function(value){return GetProp("m_bShouldDetach")}
4297
4298 CBaseEntity["SetAttachConstraint"] <- function(value){SetPropEntity("m_pAttachConstraint", value)}
4299 CBaseEntity["GetAttachConstraint"] <- function(value){return GetPropEntity("m_pAttachConstraint")}
4300
4301
4302 CBaseEntity["SetPlayer"] <- function(value){SetPropEntity("m_hPlayer", value)}
4303 CBaseEntity["GetPlayer"] <- function(value){return GetPropEntity("m_hPlayer")}
4304
4305 CBaseEntity["SetSpeed"] <- function(value){SetProp("m_nSpeed", value.tointeger())}
4306 CBaseEntity["GetSpeed"] <- function(value){return GetProp("m_nSpeed")}
4307
4308 CBaseEntity["SetRPM"] <- function(value){SetProp("m_nRPM", value.tointeger())}
4309 CBaseEntity["GetRPM"] <- function(value){return GetProp("m_nRPM")}
4310
4311 CBaseEntity["SetThrottle"] <- function(value){SetProp("m_flThrottle", value.tofloat())}
4312 CBaseEntity["GetThrottle"] <- function(value){return GetProp("m_flThrottle")}
4313
4314 CBaseEntity["SetBoostTimeLeft"] <- function(value){SetProp("m_nBoostTimeLeft", value.tointeger())}
4315 CBaseEntity["GetBoostTimeLeft"] <- function(value){return GetProp("m_nBoostTimeLeft")}
4316
4317 CBaseEntity["SetHasBoost"] <- function(value){SetProp("m_nHasBoost", value.tointeger())}
4318 CBaseEntity["GetHasBoost"] <- function(value){return GetProp("m_nHasBoost")}
4319
4320 CBaseEntity["SetScannerDisabledWeapons"] <- function(value){SetProp("m_nScannerDisabledWeapons", value.tointeger())}
4321 CBaseEntity["GetScannerDisabledWeapons"] <- function(value){return GetProp("m_nScannerDisabledWeapons")}
4322
4323 CBaseEntity["SetScannerDisabledVehicle"] <- function(value){SetProp("m_nScannerDisabledVehicle", value.tointeger())}
4324 CBaseEntity["GetScannerDisabledVehicle"] <- function(value){return GetProp("m_nScannerDisabledVehicle")}
4325
4326 CBaseEntity["SetEnterAnimOn"] <- function(value){SetProp("m_bEnterAnimOn", value.tointeger())}
4327 CBaseEntity["GetEnterAnimOn"] <- function(value){return GetProp("m_bEnterAnimOn")}
4328
4329 CBaseEntity["SetExitAnimOn"] <- function(value){SetProp("m_bExitAnimOn", value.tointeger())}
4330 CBaseEntity["GetExitAnimOn"] <- function(value){return GetProp("m_bExitAnimOn")}
4331
4332 CBaseEntity["SetUnableToFire"] <- function(value){SetProp("m_bUnableToFire", value.tointeger())}
4333 CBaseEntity["GetUnableToFire"] <- function(value){return GetProp("m_bUnableToFire")}
4334
4335 CBaseEntity["SetEyeExitEndpoint"] <- function(value){SetProp("m_vecEyeExitEndpoint", value)}
4336 CBaseEntity["GetEyeExitEndpoint"] <- function(value){return GetProp("m_vecEyeExitEndpoint")}
4337
4338 CBaseEntity["SetHasGun"] <- function(value){SetProp("m_bHasGun", value.tointeger())}
4339 CBaseEntity["GetHasGun"] <- function(value){return GetProp("m_bHasGun")}
4340
4341 CBaseEntity["SetGunCrosshair"] <- function(value){SetProp("m_vecGunCrosshair", value)}
4342 CBaseEntity["GetGunCrosshair"] <- function(value){return GetProp("m_vecGunCrosshair")}
4343
4344
4345 CBaseEntity["SetShadowDirection"] <- function(value){SetProp("m_shadowDirection", value)}
4346 CBaseEntity["GetShadowDirection"] <- function(value){return GetProp("m_shadowDirection")}
4347
4348 CBaseEntity["SetShadowColor"] <- function(value){SetProp("m_shadowColor", value.tointeger())}
4349 CBaseEntity["GetShadowColor"] <- function(value){return GetProp("m_shadowColor")}
4350
4351 CBaseEntity["SetShadowMaxDist"] <- function(value){SetProp("m_flShadowMaxDist", value.tofloat())}
4352 CBaseEntity["GetShadowMaxDist"] <- function(value){return GetProp("m_flShadowMaxDist")}
4353
4354 CBaseEntity["SetDisableShadows"] <- function(value){SetProp("m_bDisableShadows", value.tointeger())}
4355 CBaseEntity["GetDisableShadows"] <- function(value){return GetProp("m_bDisableShadows")}
4356
4357 CBaseEntity["SetEnableLocalLightShadows"] <- function(value){SetProp("m_bEnableLocalLightShadows", value.tointeger())}
4358 CBaseEntity["GetEnableLocalLightShadows"] <- function(value){return GetProp("m_bEnableLocalLightShadows")}
4359
4360
4361 CBaseEntity["SetMixLayerName"] <- function(value){SetProp("m_iszMixLayerName", value.tostring())}
4362 CBaseEntity["GetMixLayerName"] <- function(value){return GetProp("m_iszMixLayerName")}
4363
4364 CBaseEntity["SetMixLayerLevel"] <- function(value){SetProp("m_fMixLayerLevel", value.tofloat())}
4365 CBaseEntity["GetMixLayerLevel"] <- function(value){return GetProp("m_fMixLayerLevel")}
4366
4367
4368 CBaseEntity["SetLightScale"] <- function(value){SetProp("m_flLightScale", value.tofloat())}
4369 CBaseEntity["GetLightScale"] <- function(value){return GetProp("m_flLightScale")}
4370
4371 CBaseEntity["SetRadius"] <- function(value){SetProp("m_Radius", value.tofloat())}
4372 CBaseEntity["GetRadius"] <- function(value){return GetProp("m_Radius")}
4373
4374 CBaseEntity["SetSpotlightDir"] <- function(value){SetProp("m_vSpotlightDir", value)}
4375 CBaseEntity["GetSpotlightDir"] <- function(value){return GetProp("m_vSpotlightDir")}
4376
4377 CBaseEntity["SetSpotlightOrg"] <- function(value){SetProp("m_vSpotlightOrg", value)}
4378 CBaseEntity["GetSpotlightOrg"] <- function(value){return GetProp("m_vSpotlightOrg")}
4379
4380
4381 CBaseEntity["SetHumanSpectatorUserID"] <- function(value){SetProp("m_humanSpectatorUserID", value.tointeger())}
4382 CBaseEntity["GetHumanSpectatorUserID"] <- function(value){return GetProp("m_humanSpectatorUserID")}
4383
4384 CBaseEntity["SetHumanSpectatorEntIndex"] <- function(value){SetProp("m_humanSpectatorEntIndex", value.tointeger())}
4385 CBaseEntity["GetHumanSpectatorEntIndex"] <- function(value){return GetProp("m_humanSpectatorEntIndex")}
4386
4387
4388 CBaseEntity["SetCharacterType"] <- function(value){SetProp("m_nCharacterType", value.tointeger())}
4389 CBaseEntity["GetCharacterType"] <- function(value){return GetProp("m_nCharacterType")}
4390
4391
4392 CBaseEntity["SetFreezePeriod"] <- function(value){SetProp("terror_gamerules_data.m_bFreezePeriod", value.tointeger())}
4393 CBaseEntity["GetFreezePeriod"] <- function(value){return GetProp("terror_gamerules_data.m_bFreezePeriod")}
4394
4395 CBaseEntity["SetRoundTime"] <- function(value){SetProp("terror_gamerules_data.m_iRoundTime", value.tointeger())}
4396 CBaseEntity["GetRoundTime"] <- function(value){return GetProp("terror_gamerules_data.m_iRoundTime")}
4397
4398 CBaseEntity["SetLevelStartTime"] <- function(value){SetProp("terror_gamerules_data.m_fLevelStartTime", value.tofloat())}
4399 CBaseEntity["GetLevelStartTime"] <- function(value){return GetProp("terror_gamerules_data.m_fLevelStartTime")}
4400
4401 CBaseEntity["SetGameStartTime"] <- function(value){SetProp("terror_gamerules_data.m_flGameStartTime", value.tofloat())}
4402 CBaseEntity["GetGameStartTime"] <- function(value){return GetProp("terror_gamerules_data.m_flGameStartTime")}
4403
4404 CBaseEntity["SetInIntro"] <- function(value){SetProp("terror_gamerules_data.m_bInIntro", value.tointeger())}
4405 CBaseEntity["GetInIntro"] <- function(value){return GetProp("terror_gamerules_data.m_bInIntro")}
4406
4407 CBaseEntity["SetServerRank"] <- function(value){SetProp("terror_gamerules_data.m_iServerRank", value.tointeger())}
4408 CBaseEntity["GetServerRank"] <- function(value){return GetProp("terror_gamerules_data.m_iServerRank")}
4409
4410 CBaseEntity["SetServerPlayerCount"] <- function(value){SetProp("terror_gamerules_data.m_iServerPlayerCount", value.tointeger())}
4411 CBaseEntity["GetServerPlayerCount"] <- function(value){return GetProp("terror_gamerules_data.m_iServerPlayerCount")}
4412
4413 CBaseEntity["SetIsDedicatedServer"] <- function(value){SetProp("terror_gamerules_data.m_bIsDedicatedServer", value.tointeger())}
4414 CBaseEntity["GetIsDedicatedServer"] <- function(value){return GetProp("terror_gamerules_data.m_bIsDedicatedServer")}
4415
4416 CBaseEntity["SetServerSteamGroupID"] <- function(value){SetProp("terror_gamerules_data.m_iServerSteamGroupID", value.tointeger())}
4417 CBaseEntity["GetServerSteamGroupID"] <- function(value){return GetProp("terror_gamerules_data.m_iServerSteamGroupID")}
4418
4419 CBaseEntity["SetRoundStartTime"] <- function(value){SetProp("terror_gamerules_data.m_flRoundStartTime", value.tofloat())}
4420 CBaseEntity["GetRoundStartTime"] <- function(value){return GetProp("terror_gamerules_data.m_flRoundStartTime")}
4421
4422 CBaseEntity["SetRoundEndTime"] <- function(value){SetProp("terror_gamerules_data.m_flRoundEndTime", value.tofloat())}
4423 CBaseEntity["GetRoundEndTime"] <- function(value){return GetProp("terror_gamerules_data.m_flRoundEndTime")}
4424
4425 CBaseEntity["SetAccumulatedTime"] <- function(value){SetProp("terror_gamerules_data.m_flAccumulatedTime", value.tofloat())}
4426 CBaseEntity["GetAccumulatedTime"] <- function(value){return GetProp("terror_gamerules_data.m_flAccumulatedTime")}
4427
4428 CBaseEntity["SetRoundNumber"] <- function(value){SetProp("terror_gamerules_data.m_nRoundNumber", value.tointeger())}
4429 CBaseEntity["GetRoundNumber"] <- function(value){return GetProp("terror_gamerules_data.m_nRoundNumber")}
4430
4431 CBaseEntity["SetRoundLimit"] <- function(value){SetProp("terror_gamerules_data.m_nRoundLimit", value.tointeger())}
4432 CBaseEntity["GetRoundLimit"] <- function(value){return GetProp("terror_gamerules_data.m_nRoundLimit")}
4433
4434 CBaseEntity["SetTeamBestRoundTime"] <- function(value){SetProp("terror_gamerules_data.m_flTeamBestRoundTime", value.tofloat())}
4435 CBaseEntity["GetTeamBestRoundTime"] <- function(value){return GetProp("terror_gamerules_data.m_flTeamBestRoundTime")}
4436
4437 CBaseEntity["SetScavengeItemsRemaining"] <- function(value){SetProp("terror_gamerules_data.m_nScavengeItemsRemaining", value.tointeger())}
4438 CBaseEntity["GetScavengeItemsRemaining"] <- function(value){return GetProp("terror_gamerules_data.m_nScavengeItemsRemaining")}
4439
4440 CBaseEntity["SetScavengeItemsGoal"] <- function(value){SetProp("terror_gamerules_data.m_nScavengeItemsGoal", value.tointeger())}
4441 CBaseEntity["GetScavengeItemsGoal"] <- function(value){return GetProp("terror_gamerules_data.m_nScavengeItemsGoal")}
4442
4443 CBaseEntity["SetTeamsFlipped"] <- function(value){SetProp("terror_gamerules_data.m_bAreTeamsFlipped", value.tointeger())}
4444 CBaseEntity["GetTeamsFlipped"] <- function(value){return GetProp("terror_gamerules_data.m_bAreTeamsFlipped")}
4445
4446 CBaseEntity["SetSecondHalfOfRound"] <- function(value){SetProp("terror_gamerules_data.m_bInSecondHalfOfRound", value.tointeger())}
4447 CBaseEntity["GetSecondHalfOfRound"] <- function(value){return GetProp("terror_gamerules_data.m_bInSecondHalfOfRound")}
4448
4449 CBaseEntity["SetTransitioningToNextMap"] <- function(value){SetProp("terror_gamerules_data.m_bIsTransitioningToNextMap", value.tointeger())}
4450 CBaseEntity["GetTransitioningToNextMap"] <- function(value){return GetProp("terror_gamerules_data.m_bIsTransitioningToNextMap")}
4451
4452 CBaseEntity["SetVersusVoteRestarting"] <- function(value){SetProp("terror_gamerules_data.m_bIsVersusVoteRestarting", value.tointeger())}
4453 CBaseEntity["GetVersusVoteRestarting"] <- function(value){return GetProp("terror_gamerules_data.m_bIsVersusVoteRestarting")}
4454
4455 CBaseEntity["SetChallengeModeActive"] <- function(value){SetProp("terror_gamerules_data.m_bChallengeModeActive", value.tointeger())}
4456 CBaseEntity["GetChallengeModeActive"] <- function(value){return GetProp("terror_gamerules_data.m_bChallengeModeActive")}
4457
4458 CBaseEntity["SetSacrificeEscapees"] <- function(value){SetProp("terror_gamerules_data.m_iSacrificeEscapees", value.tointeger())}
4459 CBaseEntity["GetSacrificeEscapees"] <- function(value){return GetProp("terror_gamerules_data.m_iSacrificeEscapees")}
4460
4461 CBaseEntity["SetHoldoutCooldownEndTime"] <- function(value){SetProp("terror_gamerules_data.m_flHoldoutCooldownEndTime", value.tofloat())}
4462 CBaseEntity["GetHoldoutCooldownEndTime"] <- function(value){return GetProp("terror_gamerules_data.m_flHoldoutCooldownEndTime")}
4463
4464
4465 CBaseEntity["GetListenServerHost"] <- function(){
4466 for(local i=0; i < GetPropArraySize("m_listenServerHost"); i++){
4467 if(GetProp("m_listenServerHost", i)){
4468 return EntIndexToHScript(i)
4469 }
4470 }
4471 }
4472
4473 CBaseEntity["SetTeamSwitchRule"] <- function(ent, value){
4474 if(ent.GetClassname() != "player" || !ent.IsValid()){
4475 return false
4476 }
4477
4478 SetProp("m_TeamSwitchRule", value.tointeger(), ent.GetEntityIndex())
4479 }
4480 CBaseEntity["GetTeamSwitchRule"] <- function(ent){
4481 if(ent.GetClassname() != "player" || !ent.IsValid()){
4482 return
4483 }
4484
4485 return GetProp("m_TeamSwitchRule", ent.GetEntityIndex())
4486 }
4487
4488 CBaseEntity["GetSurvivalRecordTime"] <- function(ent){
4489 if(ent.GetClassname() != "player" || !ent.IsValid()){
4490 return
4491 }
4492
4493 return GetProp("m_flSurvivalRecordTime", ent.GetEntityIndex())
4494 }
4495
4496 CBaseEntity["GetSurvivalTopMedal"] <- function(ent){
4497 if(ent.GetClassname() != "player" || !ent.IsValid()){
4498 return
4499 }
4500
4501 return GetProp("m_nSurvivalTopMedal", ent.GetEntityIndex())
4502 }
4503
4504 CBaseEntity["SetBecomeGhostAt"] <- function(ent, value){
4505 if(ent.GetClassname() != "player" || !ent.IsValid()){
4506 return false
4507 }
4508
4509 SetProp("m_flBecomeGhostAt", value.tofloat(), ent.GetEntityIndex())
4510 }
4511 CBaseEntity["GetBecomeGhostAt"] <- function(ent){
4512 if(ent.GetClassname() != "player" || !ent.IsValid()){
4513 return
4514 }
4515
4516 return GetProp("m_flBecomeGhostAt", ent.GetEntityIndex())
4517 }
4518
4519 CBaseEntity["SetTankLotteryEntryRatio"] <- function(value){SetProp("m_tankLotteryEntryRatio", value.tofloat())}
4520 CBaseEntity["GetTankLotteryEntryRatio"] <- function(value){return GetProp("m_tankLotteryEntryRatio")}
4521
4522 CBaseEntity["SetTankLotterySelectionRatio"] <- function(value){SetProp("m_tankLotterySelectionRatio", value.tofloat())}
4523 CBaseEntity["GetTankLotterySelectionRatio"] <- function(value){return GetProp("m_tankLotterySelectionRatio")}
4524
4525 CBaseEntity["SetPendingTankPlayerIndex"] <- function(value){SetProp("m_pendingTankPlayerIndex", value.tointeger())}
4526 CBaseEntity["GetPendingTankPlayerIndex"] <- function(value){return GetProp("m_pendingTankPlayerIndex")}
4527
4528 CBaseEntity["SetFinale"] <- function(value){SetProp("m_isFinale", value.tointeger())}
4529 CBaseEntity["GetFinale"] <- function(value){return GetProp("m_isFinale")}
4530
4531 CBaseEntity["SetIsSurvivorTeamReadyTime"] <- function(value){SetProp("m_isSurvivorTeamReadyTime", value.tointeger())}
4532 CBaseEntity["GetIsSurvivorTeamReadyTime"] <- function(value){return GetProp("m_isSurvivorTeamReadyTime")}
4533
4534 CBaseEntity["SetSurvivorTeamReadyTime"] <- function(value){SetProp("m_survivorTeamReadyTime", value.tointeger())}
4535 CBaseEntity["GetSurvivorTeamReadyTime"] <- function(value){return GetProp("m_survivorTeamReadyTime")}
4536
4537 CBaseEntity["SetRoundSetupTimeRemaining"] <- function(value){SetProp("m_nRoundSetupTimeRemaining", value.tointeger())}
4538 CBaseEntity["GetRoundSetupTimeRemaining"] <- function(value){return GetProp("m_nRoundSetupTimeRemaining")}
4539
4540 CBaseEntity["SetTempoState"] <- function(value){SetProp("m_tempoState", value.tointeger())}
4541 CBaseEntity["GetTempoState"] <- function(value){return GetProp("m_tempoState")}
4542
4543 CBaseEntity["SetAnySurvivorLeftSafeArea"] <- function(value){SetProp("m_hasAnySurvivorLeftSafeArea", value.tointeger())}
4544 CBaseEntity["GetAnySurvivorLeftSafeArea"] <- function(value){return GetProp("m_hasAnySurvivorLeftSafeArea")}
4545
4546 CBaseEntity["SetTeamFrozen"] <- function(value){SetProp("m_isTeamFrozen", value.tointeger())}
4547 CBaseEntity["GetTeamFrozen"] <- function(value){return GetProp("m_isTeamFrozen")}
4548
4549 CBaseEntity["SetMissionDuration"] <- function(value){SetProp("m_missionDuration", value.tointeger())}
4550 CBaseEntity["GetMissionDuration"] <- function(value){return GetProp("m_missionDuration")}
4551
4552 CBaseEntity["SetMissionWipes"] <- function(value){SetProp("m_missionWipes", value.tointeger())}
4553 CBaseEntity["GetMissionWipes"] <- function(value){return GetProp("m_missionWipes")}
4554
4555 CBaseEntity["SetSharedRandomSeed"] <- function(value){SetProp("m_sharedRandomSeed", value.tointeger())}
4556 CBaseEntity["GetSharedRandomSeed"] <- function(value){return GetProp("m_sharedRandomSeed")}
4557
4558
4559 CBaseEntity["SetUsedBySurvivorsMask"] <- function(value){SetProp("m_iUsedBySurvivorsMask", value.tointeger())}
4560 CBaseEntity["GetUsedBySurvivorsMask"] <- function(value){return GetProp("m_iUsedBySurvivorsMask")}
4561
4562 CBaseEntity["SetWeaponID"] <- function(value){SetProp("m_weaponID", value.tointeger())}
4563 CBaseEntity["GetWeaponID"] <- function(value){return GetProp("m_weaponID")}
4564
4565 CBaseEntity["SetItemCount"] <- function(value){SetProp("m_itemCount", value.tointeger())}
4566 CBaseEntity["GetItemCount"] <- function(value){return GetProp("m_itemCount")}
4567
4568
4569 CBaseEntity["SetWidth"] <- function(value){SetProp("m_flWidth", value.tofloat())}
4570 CBaseEntity["GetWidth"] <- function(value){return GetProp("m_flWidth")}
4571
4572 CBaseEntity["SetHeight"] <- function(value){SetProp("m_flHeight", value.tofloat())}
4573 CBaseEntity["GetHeight"] <- function(value){return GetProp("m_flHeight")}
4574
4575 CBaseEntity["SetAttachmentIndex"] <- function(value){SetProp("m_nAttachmentIndex", value.tointeger())}
4576 CBaseEntity["GetAttachmentIndex"] <- function(value){return GetProp("m_nAttachmentIndex")}
4577
4578 CBaseEntity["SetPanelName"] <- function(value){SetProp("m_nPanelName", value.tointeger())}
4579 CBaseEntity["GetPanelName"] <- function(value){return GetProp("m_nPanelName")}
4580
4581 CBaseEntity["SetScreenFlags"] <- function(value){SetProp("m_fScreenFlags", value.tointeger())}
4582 CBaseEntity["GetScreenFlags"] <- function(value){return GetProp("m_fScreenFlags")}
4583
4584 CBaseEntity["SetOverlayMaterial"] <- function(value){SetProp("m_nOverlayMaterial", value.tointeger())}
4585 CBaseEntity["GetOverlayMaterial"] <- function(value){return GetProp("m_nOverlayMaterial")}
4586
4587 CBaseEntity["SetPlayerOwner"] <- function(value){SetPropEntity("m_hPlayerOwner", value)}
4588 CBaseEntity["GetPlayerOwner"] <- function(value){return GetPropEntity("m_hPlayerOwner")}
4589
4590
4591 CBaseEntity["SetEnabled"] <- function(value){SetProp("m_bEnabled", value.tointeger())}
4592 CBaseEntity["GetEnabled"] <- function(value){return GetProp("m_bEnabled")}
4593
4594 CBaseEntity["SetDisplayText"] <- function(value){SetProp("m_szDisplayText", value.tostring())}
4595 CBaseEntity["GetDisplayText"] <- function(value){return GetProp("m_szDisplayText")}
4596
4597 CBaseEntity["SetSlideshowDirectory"] <- function(value){SetProp("m_szSlideshowDirectory", value.tostring())}
4598 CBaseEntity["GetSlideshowDirectory"] <- function(value){return GetProp("m_szSlideshowDirectory")}
4599
4600 CBaseEntity["SetMinSlideTime"] <- function(value){SetProp("m_fMinSlideTime", value.tofloat())}
4601 CBaseEntity["GetMinSlideTime"] <- function(value){return GetProp("m_fMinSlideTime")}
4602
4603 CBaseEntity["SetMaxSlideTime"] <- function(value){SetProp("m_fMaxSlideTime", value.tofloat())}
4604 CBaseEntity["GetMaxSlideTime"] <- function(value){return GetProp("m_fMaxSlideTime")}
4605
4606 CBaseEntity["SetCycleType"] <- function(value){SetProp("m_iCycleType", value.tointeger())}
4607 CBaseEntity["GetCycleType"] <- function(value){return GetProp("m_iCycleType")}
4608
4609 CBaseEntity["SetNoListRepeats"] <- function(value){SetProp("m_bNoListRepeats", value.tointeger())}
4610 CBaseEntity["GetNoListRepeats"] <- function(value){return GetProp("m_bNoListRepeats")}
4611
4612 CBaseEntity["SetScreenWidth"] <- function(value){SetProp("m_iScreenWidth", value.tointeger())}
4613 CBaseEntity["GetScreenWidth"] <- function(value){return GetProp("m_iScreenWidth")}
4614
4615 CBaseEntity["SetScreenHeight"] <- function(value){SetProp("m_iScreenHeight", value.tointeger())}
4616 CBaseEntity["GetScreenHeight"] <- function(value){return GetProp("m_iScreenHeight")}
4617
4618
4619 CBaseEntity["SetActiveIssueIndex"] <- function(value){SetProp("m_activeIssueIndex", value.tointeger())}
4620 CBaseEntity["GetActiveIssueIndex"] <- function(value){return GetProp("m_activeIssueIndex")}
4621
4622 CBaseEntity["SetOnlyTeamToVote"] <- function(value){SetProp("m_onlyTeamToVote", value.tointeger())}
4623 CBaseEntity["GetOnlyTeamToVote"] <- function(value){return GetProp("m_onlyTeamToVote")}
4624
4625 CBaseEntity["SetVotesYes"] <- function(value){SetProp("m_votesYes", value.tointeger())}
4626 CBaseEntity["GetVotesYes"] <- function(value){return GetProp("m_votesYes")}
4627
4628 CBaseEntity["SetVotesNo"] <- function(value){SetProp("m_votesNo", value.tointeger())}
4629 CBaseEntity["GetVotesNo"] <- function(value){return GetProp("m_votesNo")}
4630
4631 CBaseEntity["SetPotentialVotes"] <- function(value){SetProp("m_potentialVotes", value.tointeger())}
4632 CBaseEntity["GetPotentialVotes"] <- function(value){return GetProp("m_potentialVotes")}
4633
4634
4635 CBaseEntity["SetCheapWaterStartDistance"] <- function(value){SetProp("m_flCheapWaterStartDistance", value.tofloat())}
4636 CBaseEntity["GetCheapWaterStartDistance"] <- function(value){return GetProp("m_flCheapWaterStartDistance")}
4637
4638 CBaseEntity["SetCheapWaterEndDistance"] <- function(value){SetProp("m_flCheapWaterEndDistance", value.tofloat())}
4639 CBaseEntity["GetCheapWaterEndDistance"] <- function(value){return GetProp("m_flCheapWaterEndDistance")}
4640
4641
4642 CBaseEntity["SetWeaponID"] <- function(value){SetProp("m_weaponID", value.tointeger())}
4643 CBaseEntity["GetWeaponID"] <- function(value){return GetProp("m_weaponID")}
4644
4645 CBaseEntity["SetItemCount"] <- function(value){SetProp("m_itemCount", value.tointeger())}
4646 CBaseEntity["GetItemCount"] <- function(value){return GetProp("m_itemCount")}
4647
4648
4649 CBaseEntity["SetState"] <- function(value){SetProp("m_iState", value.tointeger())}
4650 CBaseEntity["GetState"] <- function(value){return GetProp("m_iState")}
4651
4652 CBaseEntity["SetHitting"] <- function(value){SetProp("m_bHitting", value.tointeger())}
4653 CBaseEntity["GetHitting"] <- function(value){return GetProp("m_bHitting")}
4654
4655
4656 CBaseEntity["SetVulnerableToSpit"] <- function(value){SetProp("m_bVulnerableToSpit", value.tointeger())}
4657 CBaseEntity["GetVulnerableToSpit"] <- function(value){return GetProp("m_bVulnerableToSpit")}
4658
4659
4660 CBaseEntity["SetLastAttackTime"] <- function(value){SetProp("m_flLastAttackTime", value.tofloat())}
4661 CBaseEntity["GetLastAttackTime"] <- function(value){return GetProp("m_flLastAttackTime")}
4662
4663 CBaseEntity["SetMeleeWeaponInfo"] <- function(value){SetPropEntity("m_hMeleeWeaponInfo", value)}
4664 CBaseEntity["GetMeleeWeaponInfo"] <- function(value){return GetPropEntity("m_hMeleeWeaponInfo")}
4665
4666 CBaseEntity["SetNextPrimaryAttackIndex"] <- function(value){SetProp("m_iNextPrimaryAttackIndex", value.tointeger())}
4667 CBaseEntity["GetNextPrimaryAttackIndex"] <- function(value){return GetProp("m_iNextPrimaryAttackIndex")}
4668
4669 CBaseEntity["SetNextStrongAttackIndex"] <- function(value){SetProp("m_iNextStrongAttackIndex", value.tointeger())}
4670 CBaseEntity["GetNextStrongAttackIndex"] <- function(value){return GetProp("m_iNextStrongAttackIndex")}
4671
4672 CBaseEntity["SetNextSecondaryAttackIndex"] <- function(value){SetProp("m_iNextSecondaryAttackIndex", value.tointeger())}
4673 CBaseEntity["GetNextSecondaryAttackIndex"] <- function(value){return GetProp("m_iNextSecondaryAttackIndex")}
4674
4675 CBaseEntity["SetInMeleeSwing"] <- function(value){SetProp("m_bInMeleeSwing", value.tointeger())}
4676 CBaseEntity["GetInMeleeSwing"] <- function(value){return GetProp("m_bInMeleeSwing")}
4677
4678 CBaseEntity["SetMeleeSwingDuration"] <- function(value){SetProp("m_meleeSwingTimer.m_duration", value.tofloat())}
4679 CBaseEntity["GetMeleeSwingDuration"] <- function(value){return GetProp("m_meleeSwingTimer.m_duration")}
4680
4681 CBaseEntity["SetMeleeSwingTimestamp"] <- function(value){SetProp("m_meleeSwingTimer.m_timestamp", value.tofloat()())}
4682 CBaseEntity["GetMeleeSwingTimestamp"] <- function(value){return GetProp("m_meleeSwingTimer.m_timestamp")}
4683
4684 CBaseEntity["SetMapSetScriptName"] <- function(value){SetProp("m_strMapSetScriptName", value.tostring())}
4685 CBaseEntity["GetMapSetScriptName"] <- function(value){return GetProp("m_strMapSetScriptName")}
4686
4687
4688 CBaseEntity["SetRage"] <- function(value){SetProp("m_rage", value.tofloat())}
4689 CBaseEntity["GetRage"] <- function(value){return GetProp("m_rage")}
4690
4691 CBaseEntity["SetWanderRage"] <- function(value){SetProp("m_wanderrage", value.tofloat())}
4692 CBaseEntity["GetWanderRage"] <- function(value){return GetProp("m_wanderrage")}
4693
4694
4695 CBaseEntity["SetWaveHeight"] <- function(value){SetProp("m_flWaveHeight", value.tofloat())}
4696 CBaseEntity["GetWaveHeight"] <- function(value){return GetProp("m_flWaveHeight")}
4697
4698 CBaseEntity["SetWorldMins"] <- function(value){SetProp("m_WorldMins", value)}
4699 CBaseEntity["GetWorldMins"] <- function(value){return GetProp("m_WorldMins")}
4700
4701 CBaseEntity["SetWorldMaxs"] <- function(value){SetProp("m_WorldMaxs", value)}
4702 CBaseEntity["GetWorldMaxs"] <- function(value){return GetProp("m_WorldMaxs")}
4703
4704 CBaseEntity["SetStartDark"] <- function(value){SetProp("m_bStartDark", value.tointeger())}
4705 CBaseEntity["GetStartDark"] <- function(value){return GetProp("m_bStartDark")}
4706
4707 CBaseEntity["SetMaxOccludeeArea"] <- function(value){SetProp("m_flMaxOccludeeArea", value.tofloat())}
4708 CBaseEntity["GetMaxOccludeeArea"] <- function(value){return GetProp("m_flMaxOccludeeArea")}
4709
4710 CBaseEntity["SetMinOccluderArea"] <- function(value){SetProp("m_flMinOccluderArea", value.tofloat())}
4711 CBaseEntity["GetMinOccluderArea"] <- function(value){return GetProp("m_flMinOccluderArea")}
4712
4713 CBaseEntity["SetMaxPropScreenSpaceWidth"] <- function(value){SetProp("m_flMaxPropScreenSpaceWidth", value.tofloat())}
4714 CBaseEntity["GetMaxPropScreenSpaceWidth"] <- function(value){return GetProp("m_flMaxPropScreenSpaceWidth")}
4715
4716 CBaseEntity["SetMinPropScreenSpaceWidth"] <- function(value){SetProp("m_flMinPropScreenSpaceWidth", value.tofloat())}
4717 CBaseEntity["GetMinPropScreenSpaceWidth"] <- function(value){return GetProp("m_flMinPropScreenSpaceWidth")}
4718
4719 CBaseEntity["SetDetailSpriteMaterial"] <- function(value){SetProp("m_iszDetailSpriteMaterial", value.tostring())}
4720 CBaseEntity["GetDetailSpriteMaterial"] <- function(value){return GetProp("m_iszDetailSpriteMaterial")}
4721
4722 CBaseEntity["SetStartMusicType"] <- function(value){SetProp("m_iStartMusicType", value.tointeger())}
4723 CBaseEntity["GetStartMusicType"] <- function(value){return GetProp("m_iStartMusicType")}
4724
4725 CBaseEntity["SetMusicPostFix"] <- function(value){SetProp("m_iszMusicPostFix", value.tostring())}
4726 CBaseEntity["GetMusicPostFix"] <- function(value){return GetProp("m_iszMusicPostFix")}
4727
4728 CBaseEntity["SetColdWorld"] <- function(value){SetProp("m_bColdWorld", value.tointeger())}
4729 CBaseEntity["GetColdWorld"] <- function(value){return GetProp("m_bColdWorld")}
4730
4731 CBaseEntity["SetChapterTitle"] <- function(value){SetProp("m_iszChapterTitle", value.tostring())}
4732 CBaseEntity["GetChapterTitle"] <- function(value){return GetProp("m_iszChapterTitle")}
4733
4734 CBaseEntity["SetDisplayTitle"] <- function(value){SetProp("m_bDisplayTitle", value.tointeger())}
4735 CBaseEntity["GetDisplayTitle"] <- function(value){return GetProp("m_bDisplayTitle")}
4736
4737 CBaseEntity["SetTimeOfDay"] <- function(value){SetProp("m_iTimeOfDay", value.tointeger())}
4738 CBaseEntity["GetTimeOfDay"] <- function(value){return GetProp("m_iTimeOfDay")}
4739 }
4740
4741 local func_CBaseAnimating = function(){
4742 CBaseAnimating["GetMoveType"] <- function(){return GetPropInt("movetype")}
4743 CBaseAnimating["SetMoveType"] <- function(type){SetPropInt("movetype", type)}
4744
4745 CBaseAnimating["PlaySound"] <- function(soundName){EmitSoundOn(soundName, this)}
4746 CBaseAnimating["StopSound"] <- function(soundName){StopSoundOn(soundName, this)}
4747
4748 CBaseAnimating["GetFlags"] <- function(){return GetPropInt("m_fFlags")}
4749 CBaseAnimating["SetFlags"] <- function(flag){SetPropInt("m_fFlags", flag)}
4750 CBaseAnimating["AddFlag"] <- function(flag){SetPropInt("m_fFlags", GetPropInt("m_fFlags") | flag)}
4751 CBaseAnimating["RemoveFlag"] <- function(flag){SetPropInt("m_fFlags", GetPropInt("m_fFlags") & ~flag)}
4752 CBaseAnimating["HasFlag"] <- function(flag){return GetFlags() & flag}
4753
4754 CBaseAnimating["GetSpawnflags"] <- function(){return GetPropInt("m_spawnflags")}
4755 CBaseAnimating["SetSpawnFlags"] <- function(flags){SetPropInt("m_spawnflags", flags)}
4756
4757 CBaseAnimating["GetGlowType"] <- function(){return GetPropInt("m_Glow.m_iGlowType")}
4758 CBaseAnimating["SetGlowType"] <- function(type){SetPropInt("m_Glow.m_iGlowType", type)}
4759
4760 CBaseAnimating["GetGlowRange"] <- function(){return GetPropInt("m_Glow.m_nGlowRange")}
4761 CBaseAnimating["SetGlowRange"] <- function(range){SetPropInt("m_Glow.m_nGlowRange", range)}
4762
4763 CBaseAnimating["GetGlowRangeMin"] <- function(){return GetPropInt("m_Glow.m_nGlowRangeMin")}
4764 CBaseAnimating["SetGlowRangeMin"] <- function(range){SetPropInt("m_Glow.m_nGlowRangeMin", range)}
4765
4766 CBaseAnimating["GetGlowColor"] <- function(){return GetPropInt("m_Glow.m_glowColorOverride")}
4767 CBaseAnimating["SetGlowColor"] <- function(r, g, b){
4768 local color = r
4769 color += 256 * g
4770 color += 65536 * b
4771 SetPropInt("m_Glow.m_glowColorOverride", color)
4772 }
4773 CBaseAnimating["SetGlowColorVector"] <- function(vector){
4774 local color = vector.x
4775 color += 256 * vector.y
4776 color += 65536 * vector.z
4777 SetPropInt("m_Glow.m_glowColorOverride", color)
4778 }
4779 CBaseAnimating["ResetGlowColor"] <- function(){SetPropInt("m_Glow.m_glowColorOverride", -1)}
4780
4781 CBaseAnimating["GetSequence"] <- function(){return GetPropInt("m_nSequence")}
4782 CBaseAnimating["GetValidatedScriptScope"] <- function(){
4783 ValidateScriptScope()
4784 return GetScriptScope()
4785 }
4786
4787 CBaseAnimating["SetTeam"] <- function(team){SetPropInt("m_iTeamNum", team.tointeger())}
4788 CBaseAnimating["GetTeam"] <- function(){return GetPropInt("m_iTeamNum")}
4789
4790 CBaseAnimating["Input"] <- function(input, value = "", delay = 0, activator = null){DoEntFire("!self", input.tostring(), value.tostring(), delay.tofloat(), activator, this)}
4791 CBaseAnimating["SetAlpha"] <- function(alpha){Input("Alpha", alpha)}
4792 CBaseAnimating["Enable"] <- function(){Input("Enable")}
4793 CBaseAnimating["Disable"] <- function(){Input("Disable")}
4794
4795 CBaseAnimating["GetMoveType"] <- function(){return GetPropInt("movetype")}
4796 CBaseAnimating["SetMoveType"] <- function(type){SetPropInt("movetype", type)}
4797
4798 CBaseAnimating["GetModelIndex"] <- function(){return GetPropInt("m_nModelIndex")}
4799 CBaseAnimating["GetModelName"] <- function(){return GetPropString("m_ModelName")}
4800 CBaseAnimating["SetName"] <- function(name){SetPropString("m_iName", name)}
4801
4802 CBaseAnimating["GetFriction"] <- function(){return GetFriction(this)}
4803
4804 CBaseAnimating["HasProp"] <- function(propertyName){return NetProps.HasProp(this, propertyName)}
4805 CBaseAnimating["GetPropType"] <- function(propertyName){return NetProps.GetPropType(this, propertyName)}
4806 CBaseAnimating["GetPropArraySize"] <- function(propertyName){return NetProps.GetPropArraySize(this, propertyName)}
4807
4808 CBaseAnimating["GetPropInt"] <- function(propertyName){return NetProps.GetPropInt(this, propertyName)}
4809 CBaseAnimating["GetPropEntity"] <- function(propertyName){return NetProps.GetPropEntity(this, propertyName)}
4810 CBaseAnimating["GetPropString"] <- function(propertyName){return NetProps.GetPropString(this, propertyName)}
4811 CBaseAnimating["GetPropFloat"] <- function(propertyName){return NetProps.GetPropFloat(this, propertyName)}
4812 CBaseAnimating["GetPropVector"] <- function(propertyName){return NetProps.GetPropVector(this, propertyName)}
4813 CBaseAnimating["SetPropInt"] <- function(propertyName, value){return NetProps.SetPropInt(this, propertyName, value)}
4814 CBaseAnimating["SetPropEntity"] <- function(propertyName, value){return NetProps.SetPropEntity(this, propertyName, value)}
4815 CBaseAnimating["SetPropString"] <- function(propertyName, value){return NetProps.SetPropString(this, propertyName, value)}
4816 CBaseAnimating["SetPropFloat"] <- function(propertyName, value){return NetProps.SetPropFloat(this, propertyName, value)}
4817 CBaseAnimating["SetPropVector"] <- function(propertyName, value){return NetProps.SetPropVector(this, propertyName, value)}
4818
4819 CBaseAnimating["GetPropIntArray"] <- function(propertyName, index){return NetProps.GetPropIntArray(this, propertyName, index)}
4820 CBaseAnimating["GetPropEntityArray"] <- function(propertyName, index){return NetProps.GetPropEntityArray(this, propertyName, index)}
4821 CBaseAnimating["GetPropStringArray"] <- function(propertyName, index){return NetProps.GetPropStringArray(this, propertyName, index)}
4822 CBaseAnimating["GetPropFloatArray"] <- function(propertyName, index){return NetProps.GetPropFloatArray(this, propertyName, index)}
4823 CBaseAnimating["GetPropVectorArray"] <- function(propertyName, index){return NetProps.GetPropVectorArray(this, propertyName, index)}
4824 CBaseAnimating["SetPropIntArray"] <- function(propertyName, index, value){return NetProps.SetPropIntArray(this, propertyName, value, index)}
4825 CBaseAnimating["SetPropEntityArray"] <- function(propertyName, index, value){return NetProps.SetPropEntityArray(this, propertyName, value, index)}
4826 CBaseAnimating["SetPropStringArray"] <- function(propertyName, index, value){return NetProps.SetPropStringArray(this, propertyName, value, index)}
4827 CBaseAnimating["SetPropFloatArray"] <- function(propertyName, index, value){return NetProps.SetPropFloatArray(this, propertyName, value, index)}
4828 CBaseAnimating["SetPropVectorArray"] <- function(propertyName, index, value){return NetProps.SetPropVectorArray(this, propertyName, value, index)}
4829
4830 CBaseAnimating["SetProp"] <- function(propertyName, value, index = null){
4831 if(GetPropType(propertyName) == "integer"){
4832 if(GetPropArraySize(propertyName) > 0){
4833 if(typeof(value) == "array"){
4834 for(local i=0; i < value.len(); i++){
4835 SetPropIntArray(propertyName, i, value[i])
4836 }
4837 } else {
4838 SetPropIntArray(propertyName, index, value)
4839 }
4840 } else {
4841 SetPropInt(propertyName, value)
4842 }
4843 } else if(GetPropType(propertyName) == "float"){
4844 if(GetPropArraySize(propertyName) > 0){
4845 if(typeof(value) == "array"){
4846 for(local i=0; i < value.len(); i++){
4847 SetPropFloatArray(propertyName, i, value[i])
4848 }
4849 } else {
4850 SetPropFloatArray(propertyName, index, value)
4851 }
4852 } else {
4853 SetPropFloat(propertyName, value)
4854 }
4855 } else if(GetPropType(propertyName) == "Vector"){
4856 if(GetPropArraySize(propertyName) > 0){
4857 if(typeof(value) == "array"){
4858 for(local i=0; i < value.len(); i++){
4859 SetPropVectorArray(propertyName, i, value[i])
4860 }
4861 } else {
4862 SetPropVectorArray(propertyName, index, value)
4863 }
4864 } else {
4865 SetPropVector(propertyName, value)
4866 }
4867 } else if(GetPropType(propertyName) == "string"){
4868 if(GetPropArraySize(propertyName) > 0){
4869 if(typeof(value) == "array"){
4870 for(local i=0; i < value.len(); i++){
4871 SetPropStringArray(propertyName, i, value[i])
4872 }
4873 } else {
4874 SetPropStringArray(propertyName, index, value)
4875 }
4876 } else {
4877 SetPropString(propertyName, value)
4878 }
4879 }
4880 }
4881 CBaseAnimating["GetProp"] <- function(propertyName, index = null, asArray = false){
4882 if(GetPropType(propertyName) == "integer"){
4883 if(GetPropArraySize(propertyName) > 0){
4884 if(asArray){
4885 local netpropArray = []
4886 for(local i=0; i < GetPropArraySize(propertyName); i++){
4887 netpropArray.append(GetPropIntArray(propertyName, i))
4888 }
4889 return netpropArray
4890 }
4891 return GetPropIntArray(propertyName, index)
4892 } else {
4893 return GetPropInt(propertyName)
4894 }
4895 } else if(GetPropType(propertyName) == "float"){
4896 if(GetPropArraySize(propertyName) > 0){
4897 if(asArray){
4898 local netpropArray = []
4899 for(local i=0; i < GetPropArraySize(propertyName); i++){
4900 netpropArray.append(GetPropFloatArray(propertyName, i))
4901 }
4902 return netpropArray
4903 }
4904 return GetPropFloatArray(propertyName, index)
4905 } else {
4906 return GetPropFloat(propertyName)
4907 }
4908 } else if(GetPropType(propertyName) == "Vector"){
4909 if(GetPropArraySize(propertyName) > 0){
4910 if(asArray){
4911 local netpropArray = []
4912 for(local i=0; i < GetPropArraySize(propertyName); i++){
4913 netpropArray.append(GetPropVectorArray(propertyName, i))
4914 }
4915 return netpropArray
4916 }
4917 return GetPropVectorArray(propertyName, index)
4918 } else {
4919 return GetPropVector(propertyName)
4920 }
4921 } else if(GetPropType(propertyName) == "string"){
4922 if(GetPropArraySize(propertyName) > 0){
4923 if(asArray){
4924 local netpropArray = []
4925 for(local i=0; i < GetPropArraySize(propertyName); i++){
4926 netpropArray.append(GetPropStringArray(propertyName, i))
4927 }
4928 return netpropArray
4929 }
4930 return GetPropStringArray(propertyName, index)
4931 } else {
4932 return GetPropString(propertyName)
4933 }
4934 }
4935 }
4936
4937 CBaseAnimating["SetRenderFX"] <- function(value){SetProp("m_nRenderFX", value.tointeger())}
4938 CBaseAnimating["GetRenderFX"] <- function(){return GetProp("m_nRenderFX")}
4939
4940 CBaseAnimating["SetRenderMode"] <- function(value){SetProp("m_nRenderMode", value.tointeger())}
4941 CBaseAnimating["GetRenderMode"] <- function(){return GetProp("m_nRenderMode")}
4942
4943 CBaseAnimating["SetClip"] <- function(clip){SetPropInt("m_iClip1", clip)}
4944 CBaseAnimating["GetClip"] <- function(){return GetPropInt("m_iClip1")}
4945 CBaseAnimating["SetReserveAmmo"] <- function(ammo){SetPropInt("m_iExtraPrimaryAmmo", ammo)}
4946 CBaseAnimating["GetReserveAmmo"] <- function(){return GetPropInt("m_iExtraPrimaryAmmo")}
4947 }
4948
4949 local func_CTerrorPlayer = function(){
4950 improvedMethods = true
4951
4952 CTerrorPlayer["HasProp"] <- function(propertyName){return NetProps.HasProp(this, propertyName)}
4953 CTerrorPlayer["GetPropType"] <- function(propertyName){return NetProps.GetPropType(this, propertyName)}
4954 CTerrorPlayer["GetPropArraySize"] <- function(propertyName){return NetProps.GetPropArraySize(this, propertyName)}
4955
4956 CTerrorPlayer["GetPropInt"] <- function(propertyName){return NetProps.GetPropInt(this, propertyName)}
4957 CTerrorPlayer["GetPropEntity"] <- function(propertyName){return NetProps.GetPropEntity(this, propertyName)}
4958 CTerrorPlayer["GetPropString"] <- function(propertyName){return NetProps.GetPropString(this, propertyName)}
4959 CTerrorPlayer["GetPropFloat"] <- function(propertyName){return NetProps.GetPropFloat(this, propertyName)}
4960 CTerrorPlayer["GetPropVector"] <- function(propertyName){return NetProps.GetPropVector(this, propertyName)}
4961 CTerrorPlayer["SetPropInt"] <- function(propertyName, value){return NetProps.SetPropInt(this, propertyName, value)}
4962 CTerrorPlayer["SetPropEntity"] <- function(propertyName, value){return NetProps.SetPropEntity(this, propertyName, value)}
4963 CTerrorPlayer["SetPropString"] <- function(propertyName, value){return NetProps.SetPropString(this, propertyName, value)}
4964 CTerrorPlayer["SetPropFloat"] <- function(propertyName, value){return NetProps.SetPropFloat(this, propertyName, value)}
4965 CTerrorPlayer["SetPropVector"] <- function(propertyName, value){return NetProps.SetPropVector(this, propertyName, value)}
4966
4967 CTerrorPlayer["GetPropIntArray"] <- function(propertyName, index){return NetProps.GetPropIntArray(this, propertyName, index)}
4968 CTerrorPlayer["GetPropEntityArray"] <- function(propertyName, index){return NetProps.GetPropEntityArray(this, propertyName, index)}
4969 CTerrorPlayer["GetPropStringArray"] <- function(propertyName, index){return NetProps.GetPropStringArray(this, propertyName, index)}
4970 CTerrorPlayer["GetPropFloatArray"] <- function(propertyName, index){return NetProps.GetPropFloatArray(this, propertyName, index)}
4971 CTerrorPlayer["GetPropVectorArray"] <- function(propertyName, index){return NetProps.GetPropVectorArray(this, propertyName, index)}
4972 CTerrorPlayer["SetPropIntArray"] <- function(propertyName, index, value){return NetProps.SetPropIntArray(this, propertyName, value, index)}
4973 CTerrorPlayer["SetPropEntityArray"] <- function(propertyName, index, value){return NetProps.SetPropEntityArray(this, propertyName, value, index)}
4974 CTerrorPlayer["SetPropStringArray"] <- function(propertyName, index, value){return NetProps.SetPropStringArray(this, propertyName, value, index)}
4975 CTerrorPlayer["SetPropFloatArray"] <- function(propertyName, index, value){return NetProps.SetPropFloatArray(this, propertyName, value, index)}
4976 CTerrorPlayer["SetPropVectorArray"] <- function(propertyName, index, value){return NetProps.SetPropVectorArray(this, propertyName, value, index)}
4977
4978 CTerrorPlayer["SetProp"] <- function(propertyName, value, index = null){
4979 if(GetPropType(propertyName) == "integer"){
4980 if(GetPropArraySize(propertyName) > 0){
4981 if(typeof(value) == "array"){
4982 for(local i=0; i < value.len(); i++){
4983 SetPropIntArray(propertyName, i, value[i])
4984 }
4985 } else {
4986 SetPropIntArray(propertyName, index, value)
4987 }
4988 } else {
4989 SetPropInt(propertyName, value)
4990 }
4991 } else if(GetPropType(propertyName) == "float"){
4992 if(GetPropArraySize(propertyName) > 0){
4993 if(typeof(value) == "array"){
4994 for(local i=0; i < value.len(); i++){
4995 SetPropFloatArray(propertyName, i, value[i])
4996 }
4997 } else {
4998 SetPropFloatArray(propertyName, index, value)
4999 }
5000 } else {
5001 SetPropFloat(propertyName, value)
5002 }
5003 } else if(GetPropType(propertyName) == "Vector"){
5004 if(GetPropArraySize(propertyName) > 0){
5005 if(typeof(value) == "array"){
5006 for(local i=0; i < value.len(); i++){
5007 SetPropVectorArray(propertyName, i, value[i])
5008 }
5009 } else {
5010 SetPropVectorArray(propertyName, index, value)
5011 }
5012 } else {
5013 SetPropVector(propertyName, value)
5014 }
5015 } else if(GetPropType(propertyName) == "string"){
5016 if(GetPropArraySize(propertyName) > 0){
5017 if(typeof(value) == "array"){
5018 for(local i=0; i < value.len(); i++){
5019 SetPropStringArray(propertyName, i, value[i])
5020 }
5021 } else {
5022 SetPropStringArray(propertyName, index, value)
5023 }
5024 } else {
5025 SetPropString(propertyName, value)
5026 }
5027 }
5028 }
5029 CTerrorPlayer["GetProp"] <- function(propertyName, index = null, asArray = false){
5030 if(GetPropType(propertyName) == "integer"){
5031 if(GetPropArraySize(propertyName) > 0){
5032 if(asArray){
5033 local netpropArray = []
5034 for(local i=0; i < GetPropArraySize(propertyName); i++){
5035 netpropArray.append(GetPropIntArray(propertyName, i))
5036 }
5037 return netpropArray
5038 }
5039 return GetPropIntArray(propertyName, index)
5040 } else {
5041 return GetPropInt(propertyName)
5042 }
5043 } else if(GetPropType(propertyName) == "float"){
5044 if(GetPropArraySize(propertyName) > 0){
5045 if(asArray){
5046 local netpropArray = []
5047 for(local i=0; i < GetPropArraySize(propertyName); i++){
5048 netpropArray.append(GetPropFloatArray(propertyName, i))
5049 }
5050 return netpropArray
5051 }
5052 return GetPropFloatArray(propertyName, index)
5053 } else {
5054 return GetPropFloat(propertyName)
5055 }
5056 } else if(GetPropType(propertyName) == "Vector"){
5057 if(GetPropArraySize(propertyName) > 0){
5058 if(asArray){
5059 local netpropArray = []
5060 for(local i=0; i < GetPropArraySize(propertyName); i++){
5061 netpropArray.append(GetPropVectorArray(propertyName, i))
5062 }
5063 return netpropArray
5064 }
5065 return GetPropVectorArray(propertyName, index)
5066 } else {
5067 return GetPropVector(propertyName)
5068 }
5069 } else if(GetPropType(propertyName) == "string"){
5070 if(GetPropArraySize(propertyName) > 0){
5071 if(asArray){
5072 local netpropArray = []
5073 for(local i=0; i < GetPropArraySize(propertyName); i++){
5074 netpropArray.append(GetPropStringArray(propertyName, i))
5075 }
5076 return netpropArray
5077 }
5078 return GetPropStringArray(propertyName, index)
5079 } else {
5080 return GetPropString(propertyName)
5081 }
5082 }
5083 }
5084
5085 CTerrorPlayer["Input"] <- function(input, value = "", delay = 0, activator = null){DoEntFire("!self", input.tostring(), value.tostring(), delay.tofloat(), activator, this)}
5086 CTerrorPlayer["SetAlpha"] <- function(alpha){Input("Alpha", alpha)}
5087 CTerrorPlayer["Enable"] <- function(){Input("Enable")}
5088 CTerrorPlayer["Disable"] <- function(){Input("Disable")}
5089
5090 CTerrorPlayer["SetDucked"] <- function(value){SetProp("m_Local.m_bDucked", value.tointeger())}
5091 CTerrorPlayer["GetDucked"] <- function(){return GetProp("m_Local.m_bDucked")}
5092
5093 CTerrorPlayer["SetDucking"] <- function(value){SetProp("m_Local.m_bDucking", value.tointeger())}
5094 CTerrorPlayer["GetDucking"] <- function(){return GetProp("m_Local.m_bDucking")}
5095
5096 CTerrorPlayer["SetInDuckJump"] <- function(value){SetProp("m_Local.m_bInDuckJump", value.tointeger())}
5097 CTerrorPlayer["GetInDuckJump"] <- function(){return GetProp("m_Local.m_bInDuckJump")}
5098
5099 CTerrorPlayer["SetDuckTimeInMilliseconds"] <- function(value){SetProp("m_Local.m_nDuckTimeMsecs", value.tointeger())}
5100 CTerrorPlayer["GetDuckTimeInMilliseconds"] <- function(){return GetProp("m_Local.m_nDuckTimeMsecs")}
5101
5102 CTerrorPlayer["SetDuckJumpTimeInMilliseconds"] <- function(value){SetProp("m_Local.m_nDuckJumpTimeMsecs", value.tointeger())}
5103 CTerrorPlayer["GetDuckJumpTimeInMilliseconds"] <- function(){return GetProp("m_Local.m_nDuckJumpTimeMsecs")}
5104
5105 CTerrorPlayer["SetJumpTimeInMilliseconds"] <- function(value){SetProp("m_Local.m_nJumpTimeMsecs", value.tointeger())}
5106 CTerrorPlayer["GetJumpTimeInMilliseconds"] <- function(){return GetProp("m_Local.m_nJumpTimeMsecs")}
5107
5108 CTerrorPlayer["SetPunchAngle"] <- function(value){SetProp("m_Local.m_vecPunchAngle", value)}
5109 CTerrorPlayer["GetPunchAngle"] <- function(){return GetProp("m_Local.m_vecPunchAngle")}
5110
5111 CTerrorPlayer["SetPunchAngleVel"] <- function(value){SetProp("m_Local.m_vecPunchAngleVel", value)}
5112 CTerrorPlayer["GetPunchAngleVel"] <- function(){return GetProp("m_Local.m_vecPunchAngleVel")}
5113
5114 CTerrorPlayer["SetAllowAutoMovement"] <- function(value){SetProp("m_Local.m_bAllowAutoMovement", value.tointeger())}
5115 CTerrorPlayer["GetAllowAutoMovement"] <- function(){return GetProp("m_Local.m_bAllowAutoMovement")}
5116
5117 CTerrorPlayer["SetAutoAimTarget"] <- function(value){SetProp("m_Local.m_bAutoAimTarget", value.tointeger())}
5118 CTerrorPlayer["GetAutoAimTarget"] <- function(){return GetProp("m_Local.m_bAutoAimTarget")}
5119
5120 CTerrorPlayer["SetLastWeapon"] <- function(value){SetPropEntity("m_Local.m_hLastWeapon", value)}
5121 CTerrorPlayer["GetLastWeapon"] <- function(){return GetPropEntity("m_Local.m_hLastWeapon")}
5122
5123 CTerrorPlayer["SetDeathTime"] <- function(value){SetProp("m_Local.m_flDeathTime", value.tofloat())}
5124 CTerrorPlayer["GetDeathTime"] <- function(){return GetProp("m_Local.m_flDeathTime")}
5125
5126 CTerrorPlayer["SetTonemapController"] <- function(value){SetPropEntity("m_Local.m_hTonemapController", value)}
5127 CTerrorPlayer["GetTonemapController"] <- function(){return GetPropEntity("m_Local.m_hTonemapController")}
5128
5129 CTerrorPlayer["SetShotsFired"] <- function(value){SetProp("m_iShotsFired", value.tointeger())}
5130 CTerrorPlayer["GetShotsFired"] <- function(){return GetProp("m_iShotsFired")}
5131
5132 CTerrorPlayer["SetVelocityModifier"] <- function(value){SetProp("m_flVelocityModifier", value.tofloat())}
5133 CTerrorPlayer["GetVelocityModifier"] <- function(){return GetProp("m_flVelocityModifier")}
5134
5135 CTerrorPlayer["SetArmorValue"] <- function(value){SetProp("m_ArmorValue", value.tointeger())}
5136 CTerrorPlayer["GetArmorValue"] <- function(){return GetProp("m_ArmorValue")}
5137
5138 CTerrorPlayer["SetProgressBarDuration"] <- function(value){SetProp("m_flProgressBarDuration", value.tofloat())}
5139 CTerrorPlayer["GetProgressBarDuration"] <- function(){return GetProp("m_flProgressBarDuration")}
5140
5141 CTerrorPlayer["SetProgressBarStartTime"] <- function(value){SetProp("m_flProgressBarStartTime", value.tofloat())}
5142 CTerrorPlayer["GetProgressBarStartTime"] <- function(){return GetProp("m_flProgressBarStartTime")}
5143
5144 CTerrorPlayer["SetRagdoll"] <- function(value){SetPropEntity("m_hRagdoll", value)}
5145 CTerrorPlayer["GetRagdoll"] <- function(){return GetPropEntity("m_hRagdoll")}
5146
5147 CTerrorPlayer["SetInMissionStartArea"] <- function(value){SetProp("m_isInMissionStartArea", value.tointeger())}
5148 CTerrorPlayer["GetInMissionStartArea"] <- function(){return GetProp("m_isInMissionStartArea")}
5149
5150 CTerrorPlayer["SetCulling"] <- function(value){SetProp("m_isCulling", value.tointeger())}
5151 CTerrorPlayer["GetCulling"] <- function(){return GetProp("m_isCulling")}
5152
5153 CTerrorPlayer["SetRelocating"] <- function(value){SetProp("m_isRelocating", value.tointeger())}
5154 CTerrorPlayer["GetRelocating"] <- function(){return GetProp("m_isRelocating")}
5155
5156 CTerrorPlayer["SetGhostSpawnState"] <- function(value){SetProp("m_ghostSpawnState", value.tointeger())}
5157 CTerrorPlayer["GetGhostSpawnState"] <- function(){return GetProp("m_ghostSpawnState")}
5158
5159 CTerrorPlayer["SetGhostSpawnClockMaxDelay"] <- function(value){SetProp("m_ghostSpawnClockMaxDelay", value.tointeger())}
5160 CTerrorPlayer["GetGhostSpawnClockMaxDelay"] <- function(){return GetProp("m_ghostSpawnClockMaxDelay")}
5161
5162 CTerrorPlayer["SetGhostSpawnClockCurrentDelay"] <- function(value){SetProp("m_ghostSpawnClockCurrentDelay", value.tointeger())}
5163 CTerrorPlayer["GetGhostSpawnClockCurrentDelay"] <- function(){return GetProp("m_ghostSpawnClockCurrentDelay")}
5164
5165 CTerrorPlayer["SetNextShoveTime"] <- function(value){SetProp("m_flNextShoveTime", value.tofloat())}
5166 CTerrorPlayer["GetNextShoveTime"] <- function(){return GetProp("m_flNextShoveTime")}
5167
5168 CTerrorPlayer["SetShovePenalty"] <- function(value){SetProp("m_iShovePenalty", value.tointeger())}
5169 CTerrorPlayer["GetShovePenalty"] <- function(){return GetProp("m_iShovePenalty")}
5170
5171 CTerrorPlayer["SetAutoCrouchEnabled"] <- function(value){SetProp("m_isAutoCrouchEnabled", value.tointeger())}
5172 CTerrorPlayer["GetAutoCrouchEnabled"] <- function(){return GetProp("m_isAutoCrouchEnabled")}
5173
5174 CTerrorPlayer["SetAutoCrouchTimestamp"] <- function(value){SetProp("m_autoCrouchTimer.m_timestamp", value.tofloat())}
5175 CTerrorPlayer["GetAutoCrouchTimestamp"] <- function(){return GetProp("m_autoCrouchTimer.m_timestamp")}
5176
5177 CTerrorPlayer["SetAdrenalineActive"] <- function(value){SetProp("m_bAdrenalineActive", value.tointeger())}
5178 CTerrorPlayer["GetAdrenalineActive"] <- function(){return GetProp("m_bAdrenalineActive")}
5179
5180 CTerrorPlayer["SetZombieClass"] <- function(value){SetProp("m_zombieClass", value.tointeger())}
5181 CTerrorPlayer["GetZombieClass"] <- function(){return GetProp("m_zombieClass")}
5182
5183 CTerrorPlayer["SetZombieState"] <- function(value){SetProp("m_zombieState", value.tointeger())}
5184 CTerrorPlayer["GetZombieState"] <- function(){return GetProp("m_zombieState")}
5185
5186 CTerrorPlayer["SetMaxDeadDuration"] <- function(value){SetProp("m_maxDeadDuration", value.tofloat())}
5187 CTerrorPlayer["GetMaxDeadDuration"] <- function(){return GetProp("m_maxDeadDuration")}
5188
5189 CTerrorPlayer["SetTotalDeadDuration"] <- function(value){SetProp("m_totalDeadDuration", value.tofloat())}
5190 CTerrorPlayer["GetTotalDeadDuration"] <- function(){return GetProp("m_totalDeadDuration")}
5191
5192 CTerrorPlayer["SetHangTimestamp"] <- function(value){SetProp("m_hangTimer.m_timestamp", value.tofloat())}
5193 CTerrorPlayer["GetHangTimestamp"] <- function(){return GetProp("m_hangTimer.m_timestamp")}
5194
5195 CTerrorPlayer["SetHangAirPos"] <- function(value){SetProp("m_hangAirPos", value)}
5196 CTerrorPlayer["GetHangAirPos"] <- function(){return GetProp("m_hangAirPos")}
5197
5198 CTerrorPlayer["SetHangPos"] <- function(value){SetProp("m_hangPos", value)}
5199 CTerrorPlayer["GetHangPos"] <- function(){return GetProp("m_hangPos")}
5200
5201 CTerrorPlayer["SetHangStandPos"] <- function(value){SetProp("m_hangStandPos", value)}
5202 CTerrorPlayer["GetHangStandPos"] <- function(){return GetProp("m_hangStandPos")}
5203
5204 CTerrorPlayer["SetHangNormal"] <- function(value){SetProp("m_hangNormal", value)}
5205 CTerrorPlayer["GetHangNormal"] <- function(){return GetProp("m_hangNormal")}
5206
5207 CTerrorPlayer["SetKnockdownReason"] <- function(value){SetProp("m_knockdownReason", value.tointeger())}
5208 CTerrorPlayer["GetKnockdownReason"] <- function(){return GetProp("m_knockdownReason")}
5209
5210 CTerrorPlayer["SetKnockdownTimestamp"] <- function(value){SetProp("m_knockdownTimer.m_timestamp", value.tofloat())}
5211 CTerrorPlayer["GetKnockdownTimestamp"] <- function(){return GetProp("m_knockdownTimer.m_timestamp")}
5212
5213 CTerrorPlayer["SetStaggerTimestamp"] <- function(value){SetProp("m_staggerTimer.m_timestamp", value.tofloat())}
5214 CTerrorPlayer["GetStaggerTimestamp"] <- function(){return GetProp("m_staggerTimer.m_timestamp")}
5215
5216 CTerrorPlayer["SetStaggerDuration"] <- function(value){SetProp("m_staggerTimer.m_duration", value.tofloat())}
5217 CTerrorPlayer["GetStaggerDuration"] <- function(){return GetProp("m_staggerTimer.m_duration")}
5218
5219 CTerrorPlayer["SetStaggerStart"] <- function(value){SetProp("m_staggerStart", value)}
5220 CTerrorPlayer["GetStaggerStart"] <- function(){return GetProp("m_staggerStart")}
5221
5222 CTerrorPlayer["SetStaggerDir"] <- function(value){SetProp("m_staggerDir", value)}
5223 CTerrorPlayer["GetStaggerDir"] <- function(){return GetProp("m_staggerDir")}
5224
5225 CTerrorPlayer["SetStaggerDist"] <- function(value){SetProp("m_staggerDist", value.tofloat())}
5226 CTerrorPlayer["GetStaggerDist"] <- function(){return GetProp("m_staggerDist")}
5227
5228 CTerrorPlayer["SetTugTimestamp"] <- function(value){SetProp("m_tugTimer.m_timestamp", value.tofloat())}
5229 CTerrorPlayer["GetTugTimestamp"] <- function(){return GetProp("m_tugTimer.m_timestamp")}
5230
5231 CTerrorPlayer["SetTugDuration"] <- function(value){SetProp("m_tugTimer.m_duration", value.tofloat())}
5232 CTerrorPlayer["GetTugDuration"] <- function(){return GetProp("m_tugTimer.m_duration")}
5233
5234 CTerrorPlayer["SetTugStart"] <- function(value){SetProp("m_tugStart", value)}
5235 CTerrorPlayer["GetTugStart"] <- function(){return GetProp("m_tugStart")}
5236
5237 CTerrorPlayer["SetTugDir"] <- function(value){SetProp("m_tugDir", value)}
5238 CTerrorPlayer["GetTugDir"] <- function(){return GetProp("m_tugDir")}
5239
5240 CTerrorPlayer["SetTugDist"] <- function(value){SetProp("m_tugDist", value.tofloat())}
5241 CTerrorPlayer["GetTugDist"] <- function(){return GetProp("m_tugDist")}
5242
5243 CTerrorPlayer["SetVocalizationSubject"] <- function(value){SetPropEntity("m_vocalizationSubject", value)}
5244 CTerrorPlayer["GetVocalizationSubject"] <- function(){return GetPropEntity("m_vocalizationSubject")}
5245
5246 CTerrorPlayer["SetVocalizationSubjectTimestamp"] <- function(value){SetProp("m_vocalizationSubjectTimer.m_timestamp", value.tofloat())}
5247 CTerrorPlayer["GetVocalizationSubjectTimestamp"] <- function(){return GetProp("m_vocalizationSubjectTimer.m_timestamp")}
5248
5249 CTerrorPlayer["SetVocalizationSubjectDuration"] <- function(value){SetProp("m_vocalizationSubjectTimer.m_duration", value.tofloat())}
5250 CTerrorPlayer["GetVocalizationSubjectDuration"] <- function(){return GetProp("m_vocalizationSubjectTimer.m_duration")}
5251
5252 CTerrorPlayer["SetPounceStartPosition"] <- function(value){SetProp("m_pounceStartPosition", value)}
5253 CTerrorPlayer["GetPounceStartPosition"] <- function(){return GetProp("m_pounceStartPosition")}
5254
5255 CTerrorPlayer["SetAttemptingToPounce"] <- function(value){SetProp("m_isAttemptingToPounce", value.tointeger())}
5256 CTerrorPlayer["GetAttemptingToPounce"] <- function(){return GetProp("m_isAttemptingToPounce")}
5257
5258 CTerrorPlayer["SetVomitStart"] <- function(value){SetProp("m_vomitStart", value.tofloat())}
5259 CTerrorPlayer["GetVomitStart"] <- function(){return GetProp("m_vomitStart")}
5260
5261 CTerrorPlayer["SetVomitFadeStart"] <- function(value){SetProp("m_vomitFadeStart", value.tofloat())}
5262 CTerrorPlayer["GetVomitFadeStart"] <- function(){return GetProp("m_vomitFadeStart")}
5263
5264 CTerrorPlayer["SetBashedStart"] <- function(value){SetProp("m_bashedStart", value.tofloat())}
5265 CTerrorPlayer["GetBashedStart"] <- function(){return GetProp("m_bashedStart")}
5266
5267 CTerrorPlayer["SetSalivaStart"] <- function(value){SetProp("m_salivaStart", value.tofloat())}
5268 CTerrorPlayer["GetSalivaStart"] <- function(){return GetProp("m_salivaStart")}
5269
5270 CTerrorPlayer["SetVersusTeam"] <- function(value){SetProp("m_iVersusTeam", value.tointeger())}
5271 CTerrorPlayer["GetVersusTeam"] <- function(){return GetProp("m_iVersusTeam")}
5272
5273 CTerrorPlayer["SetLagCompensation"] <- function(value){SetProp("m_bLagCompensation", value.tointeger())}
5274 CTerrorPlayer["GetLagCompensation"] <- function(){return GetProp("m_bLagCompensation")}
5275
5276 CTerrorPlayer["SetPredictWeapons"] <- function(value){SetProp("m_bPredictWeapons", value.tointeger())}
5277 CTerrorPlayer["GetPredictWeapons"] <- function(){return GetProp("m_bPredictWeapons")}
5278
5279 CTerrorPlayer["SetLastDamageAmount"] <- function(value){SetProp("m_lastDamageAmount", value.tointeger())}
5280 CTerrorPlayer["GetLastDamageAmount"] <- function(){return GetProp("m_lastDamageAmount")}
5281
5282 CTerrorPlayer["SetTimeLastHurt"] <- function(value){SetProp("m_fTimeLastHurt", value.tofloat())}
5283 CTerrorPlayer["GetTimeLastHurt"] <- function(){return GetProp("m_fTimeLastHurt")}
5284
5285 CTerrorPlayer["SetNextDecalTime"] <- function(value){SetProp("m_flNextDecalTime", value.tofloat())}
5286 CTerrorPlayer["GetNextDecalTime"] <- function(){return GetProp("m_flNextDecalTime")}
5287
5288 CTerrorPlayer["SetImpulse"] <- function(value){SetProp("m_nImpulse", value.tointeger())}
5289 CTerrorPlayer["GetImpulse"] <- function(){return GetProp("m_nImpulse")}
5290
5291 CTerrorPlayer["SetLastPlayerTalkTime"] <- function(value){SetProp("m_fLastPlayerTalkTime", value.tofloat())}
5292 CTerrorPlayer["GetLastPlayerTalkTime"] <- function(){return GetProp("m_fLastPlayerTalkTime")}
5293
5294 CTerrorPlayer["SetUnderwater"] <- function(value){SetProp("m_bPlayerUnderwater", value.tointeger())}
5295 CTerrorPlayer["GetUnderwater"] <- function(){return GetProp("m_bPlayerUnderwater")}
5296
5297 CTerrorPlayer["SetSinglePlayerGameEnding"] <- function(value){SetProp("m_bSinglePlayerGameEnding", value.tointeger())}
5298 CTerrorPlayer["GetSinglePlayerGameEnding"] <- function(){return GetProp("m_bSinglePlayerGameEnding")}
5299
5300 CTerrorPlayer["SetAutoKickDisabled"] <- function(value){SetProp("m_autoKickDisabled", value.tointeger())}
5301 CTerrorPlayer["GetAutoKickDisabled"] <- function(){return GetProp("m_autoKickDisabled")}
5302
5303 CTerrorPlayer["SetNumCrouches"] <- function(value){SetProp("m_nNumCrouches", value.tointeger())}
5304 CTerrorPlayer["GetNumCrouches"] <- function(){return GetProp("m_nNumCrouches")}
5305
5306 CTerrorPlayer["SetDuckToggled"] <- function(value){SetProp("m_bDuckToggled", value.tointeger())}
5307 CTerrorPlayer["GetDuckToggled"] <- function(){return GetProp("m_bDuckToggled")}
5308
5309 CTerrorPlayer["SetForwardMove"] <- function(value){SetProp("m_flForwardMove", value.tofloat())}
5310 CTerrorPlayer["GetForwardMove"] <- function(){return GetProp("m_flForwardMove")}
5311
5312 CTerrorPlayer["SetSideMove"] <- function(value){SetProp("m_flSideMove", value.tofloat())}
5313 CTerrorPlayer["GetSideMove"] <- function(){return GetProp("m_flSideMove")}
5314
5315 CTerrorPlayer["SetLastHitGroup"] <- function(value){SetProp("m_LastHitGroup", value.tointeger())}
5316 CTerrorPlayer["GetLastHitGroup"] <- function(){return GetProp("m_LastHitGroup")}
5317
5318 CTerrorPlayer["SetForceServerRagdoll"] <- function(value){SetProp("m_bForceServerRagdoll", value.tointeger())}
5319 CTerrorPlayer["GetForceServerRagdoll"] <- function(){return GetProp("m_bForceServerRagdoll")}
5320
5321 CTerrorPlayer["SetPreventWeaponPickup"] <- function(value){SetProp("m_bPreventWeaponPickup", value.tointeger())}
5322 CTerrorPlayer["GetPreventWeaponPickup"] <- function(){return GetProp("m_bPreventWeaponPickup")}
5323
5324 CTerrorPlayer["SetRenderFX"] <- function(value){SetProp("m_nRenderFX", value.tointeger())}
5325 CTerrorPlayer["GetRenderFX"] <- function(){return GetProp("m_nRenderFX")}
5326
5327 CTerrorPlayer["SetRenderMode"] <- function(value){SetProp("m_nRenderMode", value.tointeger())}
5328 CTerrorPlayer["GetRenderMode"] <- function(){return GetProp("m_nRenderMode")}
5329
5330 CTerrorPlayer["SetFOVRate"] <- function(value){SetProp("m_Local.m_flFOVRate", value.tofloat())}
5331 CTerrorPlayer["GetFOVRate"] <- function(){return GetProp("m_Local.m_flFOVRate")}
5332
5333 CTerrorPlayer["SetPostProcessController"] <- function(value){SetPropEntity("m_hPostProcessCtrl", value)}
5334 CTerrorPlayer["GetPostProcessController"] <- function(){return GetPropEntity("m_hPostProcessCtrl")}
5335
5336 CTerrorPlayer["SetColorCorrectionController"] <- function(value){SetPropEntity("m_hColorCorrectionCtrl", value)}
5337 CTerrorPlayer["GetColorCorrectionController"] <- function(){return GetPropEntity("m_hColorCorrectionCtrl")}
5338
5339 CTerrorPlayer["SetFogController"] <- function(value){SetPropEntity("m_PlayerFog.m_hCtrl", value)}
5340 CTerrorPlayer["GetFogController"] <- function(){return GetPropEntity("m_PlayerFog.m_hCtrl")}
5341
5342 CTerrorPlayer["SetWeapon"] <- function(value, index){SetPropEntityArray("m_hMyWeapons", value, index.tointeger())}
5343 CTerrorPlayer["GetWeapon"] <- function(index){return GetPropEntityArray("m_hMyWeapons", index.tointeger())}
5344
5345 CTerrorPlayer["SetLadderNormal"] <- function(value){SetProp("m_vecLadderNormal", value)}
5346 CTerrorPlayer["GetLadderNormal"] <- function(){return GetProp("m_vecLadderNormal")}
5347
5348 CTerrorPlayer["SetLastLadderNormal"] <- function(value){SetProp("m_lastLadderNormal", value)}
5349 CTerrorPlayer["GetLastLadderNormal"] <- function(){return GetProp("m_lastLadderNormal")}
5350
5351 CTerrorPlayer["IgnoreFallDamage"] <- function(){Input("IgnoreFallDamage")}
5352 CTerrorPlayer["IgnoreFallDamageWithoutReset"] <- function(){Input("IgnoreFallDamageWithoutReset")}
5353
5354 CTerrorPlayer["EnableLedgeHang"] <- function(){Input("EnableLedgeHang")}
5355 CTerrorPlayer["DisableLedgeHang"] <- function(){Input("DisableLedgeHang")}
5356
5357 CTerrorPlayer["SpeakResponseConcept"] <- function(){Input("SpeakResponseConcept")}
5358
5359 CTerrorPlayer["TeleportToSurvivorPosition"] <- function(){Input("TeleportToSurvivorPosition")}
5360
5361 CTerrorPlayer["ReleaseFromSurvivorPosition"] <- function(){Input("ReleaseFromSurvivorPosition")}
5362
5363 CTerrorPlayer["SetGlowEnabled"] <- function(){Input("SetGlowEnabled")}
5364
5365 CTerrorPlayer["RemoveWeaponUpgrades"] <- function(){Input("RemoveWeaponUpgrades")}
5366
5367 CTerrorPlayer["CancelCurrentScene"] <- function(){Input("CancelCurrentScene")}
5368
5369 CTerrorPlayer["GetValidatedScriptScope"] <- function(){
5370 ValidateScriptScope()
5371 return GetScriptScope()
5372 }
5373
5374 CTerrorPlayer["CommandBot"] <- function(commandTable){
5375 commandTable["bot"] <- this
5376 CommandABot(commandTable)
5377 }
5378
5379 CTerrorPlayer["GetMoveType"] <- function(){return GetPropInt("movetype")}
5380 CTerrorPlayer["SetMoveType"] <- function(type){SetPropInt("movetype", type)}
5381
5382 CTerrorPlayer["GetFlags"] <- function(){return GetPropInt("m_fFlags")}
5383 CTerrorPlayer["SetFlags"] <- function(flag){SetPropInt("m_fFlags", flag)}
5384 CTerrorPlayer["AddFlag"] <- function(flag){SetPropInt("m_fFlags", GetPropInt("m_fFlags") | flag)}
5385 CTerrorPlayer["RemoveFlag"] <- function(flag){SetPropInt("m_fFlags", GetPropInt("m_fFlags") & ~flag)}
5386 CTerrorPlayer["HasFlag"] <- function(flag){return GetFlags() & flag}
5387
5388 CTerrorPlayer["GetGlowType"] <- function(){return GetPropInt("m_Glow.m_iGlowType")}
5389 CTerrorPlayer["SetGlowType"] <- function(type){SetPropInt("m_Glow.m_iGlowType", type)}
5390
5391 CTerrorPlayer["GetGlowRange"] <- function(){return GetPropInt("m_Glow.m_nGlowRange")}
5392 CTerrorPlayer["SetGlowRange"] <- function(range){SetPropInt("m_Glow.m_nGlowRange", range)}
5393
5394 CTerrorPlayer["GetGlowRangeMin"] <- function(){return GetPropInt("m_Glow.m_nGlowRangeMin")}
5395 CTerrorPlayer["SetGlowRangeMin"] <- function(range){SetPropInt("m_Glow.m_nGlowRangeMin", range)}
5396
5397 CTerrorPlayer["GetGlowColor"] <- function(){return GetPropInt("m_Glow.m_glowColorOverride")}
5398 CTerrorPlayer["SetGlowColor"] <- function(r, g, b){
5399 local color = r
5400 color += 256 * g
5401 color += 65536 * b
5402 SetPropInt("m_Glow.m_glowColorOverride", color)
5403 }
5404 CTerrorPlayer["SetGlowColorVector"] <- function(vector){
5405 local color = vector.x
5406 color += 256 * vector.y
5407 color += 65536 * vector.z
5408 SetPropInt("m_Glow.m_glowColorOverride", color)
5409 }
5410 CTerrorPlayer["ResetGlowColor"] <- function(){SetPropInt("m_Glow.m_glowColorOverride", -1)}
5411
5412 CTerrorPlayer["GetModelIndex"] <- function(){return GetPropInt("m_nModelIndex")}
5413 CTerrorPlayer["GetModelName"] <- function(){return GetPropString("m_ModelName")}
5414
5415 CTerrorPlayer["SetName"] <- function(name){SetPropString("m_iName", name)}
5416
5417 CTerrorPlayer["GetFriction"] <- function(){return GetFriction(this)}
5418
5419 CTerrorPlayer["SetTeam"] <- function(team){SetPropInt("m_iTeamNum", team.tointeger())}
5420 CTerrorPlayer["GetTeam"] <- function(){return GetPropInt("m_iTeamNum")}
5421
5422 CTerrorPlayer["GetInterp"] <- function(){return GetPropFloat("m_fLerpTime")}
5423
5424 CTerrorPlayer["GetUpdateRate"] <- function(){return GetPropInt("m_nUpdateRate")}
5425
5426 CTerrorPlayer["SetModelScale"] <- function(modelScale){SetPropFloat("m_flModelScale", modelScale.tofloat())}
5427 CTerrorPlayer["GetModelScale"] <- function(){return GetPropFloat("m_flModelScale")}
5428
5429 CTerrorPlayer["SetThirdperson"] <- function(thirdperson){SetPropFloat("m_TimeForceExternalView", thirdperson ? 2147483647 : 0)}
5430 CTerrorPlayer["IsInThirdperson"] <- function(){return Time() < GetPropFloat("m_TimeForceExternalView")}
5431
5432 CTerrorPlayer["GetTongueVictim"] <- function(){return GetPropEntity("m_tongueVictim")}
5433 CTerrorPlayer["GetTongueAttacker"] <- function(){return GetPropEntity("m_tongueOwner")}
5434 CTerrorPlayer["GetPounceVictim"] <- function(){return GetPropEntity("m_pounceVictim")}
5435 CTerrorPlayer["GetPounceAttacker"] <- function(){return GetPropEntity("m_pounceAttacker")}
5436 CTerrorPlayer["GetLeapVictim"] <- function(){return GetPropEntity("m_jockeyVictim")}
5437 CTerrorPlayer["GetLeapAttacker"] <- function(){return GetPropEntity("m_jockeyAttacker")}
5438 CTerrorPlayer["GetChargeVictim"] <- function(){return GetPropEntity("m_jockeyVictim")}
5439 CTerrorPlayer["GetChargeAttacker"] <- function(){return GetPropEntity("m_jockeyAttacker")}
5440
5441 CTerrorPlayer["AddDisabledButton"] <- function(disabledButton){SetPropInt("m_afButtonDisabled", GetPropInt("m_afButtonDisabled") | disabledButton.tointeger())}
5442 CTerrorPlayer["RemoveDisabledButton"] <- function(disabledButton){SetPropInt("m_afButtonDisabled", GetPropInt("m_afButtonDisabled") & ~disabledButton.tointeger())}
5443 CTerrorPlayer["SetDisabledButtons"] <- function(disabledButtons){SetPropInt("m_afButtonDisabled", disabledButtons.tointeger())}
5444 CTerrorPlayer["GetDisabledButtons"] <- function(){return GetPropInt("m_afButtonDisabled")}
5445 CTerrorPlayer["HasDisabledButton"] <- function(disabledButton){return GetDisabledButtons() & disabledButton}
5446
5447 CTerrorPlayer["AddForcedButton"] <- function(forcedButton){SetPropInt("m_afButtonForced", GetPropInt("m_afButtonForced") | disabledButton.tointeger())}
5448 CTerrorPlayer["RemoveForcedButton"] <- function(forcedButton){SetPropInt("m_afButtonForced", GetPropInt("m_afButtonForced") & ~disabledButton.tointeger())}
5449 CTerrorPlayer["SetForcedButtons"] <- function(forcedButtons){SetPropInt("m_afButtonForced", disabledButtons.tointeger())}
5450 CTerrorPlayer["GetForcedButtons"] <- function(){return GetPropInt("m_afButtonForced")}
5451 CTerrorPlayer["HasForcedButton"] <- function(forcedButton){return GetForcedButtons() & forcedButton}
5452
5453 CTerrorPlayer["SetPresentAtSurvivalStart"] <- function(presentAtSurvivalStart){SetPropInt("m_bWasPresentAtSurvivalStart", presentAtSurvivalStart.tointeger())}
5454 CTerrorPlayer["WasPresentAtSurvivalStart"] <- function(){return GetPropInt("m_bWasPresentAtSurvivalStart")}
5455
5456 CTerrorPlayer["SetGhost"] <- function(ghost){SetPropInt("m_isGhost", ghost.tointeger())}
5457 CTerrorPlayer["GetGhost"] <- function(){return GetProp("m_isGhost")}
5458
5459 CTerrorPlayer["SetUsingMountedGun"] <- function(usingMountedGun){SetPropInt("m_usingMountedGun", usingMountedGun.tointeger())}
5460 CTerrorPlayer["IsUsingMountedGun"] <- function(){return GetPropInt("m_usingMountedGun")}
5461
5462 CTerrorPlayer["SetUsingMountedWeapon"] <- function(value){SetProp("m_usingMountedWeapon", value.tointeger())}
5463 CTerrorPlayer["GetUsingMountedWeapon"] <- function(){return GetProp("m_usingMountedWeapon")}
5464
5465 CTerrorPlayer["SetFirstManOut"] <- function(value){SetProp("m_bIsFirstManOut", value.tointeger())}
5466 CTerrorPlayer["GetFirstManOut"] <- function(){return GetPropInt("m_bIsFirstManOut")}
5467
5468 CTerrorPlayer["SetOnThirdStrike"] <- function(value){SetProp("m_bIsOnThirdStrike", value.tointeger())}
5469 CTerrorPlayer["GetOnThirdStrike"] <- function(){return GetProp("m_bIsOnThirdStrike")}
5470
5471 CTerrorPlayer["SetReviveCount"] <- function(value){SetProp("m_currentReviveCount", value.tointeger())}
5472 CTerrorPlayer["GetReviveCount"] <- function(){return GetPropInt("m_currentReviveCount")}
5473
5474 CTerrorPlayer["SetProneTongueDrag"] <- function(value){SetProp("m_isProneTongueDrag", value.tointeger())}
5475 CTerrorPlayer["GetProneTongueDrag"] <- function(){return GetPropInt("m_isProneTongueDrag")}
5476
5477 CTerrorPlayer["SetReachedTongueOwner"] <- function(value){SetProp("m_reachedTongueOwner", value.tointeger())}
5478 CTerrorPlayer["GetReachedTongueOwner"] <- function(){return GetPropInt("m_reachedTongueOwner")}
5479
5480 CTerrorPlayer["SetHangingFromTongue"] <- function(value){SetProp("m_reachedTongueOwner", value.tointeger())}
5481 CTerrorPlayer["GetHangingFromTongue"] <- function(){return GetPropInt("m_isHangingFromTongue")}
5482
5483 CTerrorPlayer["SetReviveTarget"] <- function(reviveTarget){SetPropEntity("m_reviveTarget", reviveTarget)}
5484 CTerrorPlayer["GetReviveTarget"] <- function(){return GetPropEntity("m_reviveTarget")}
5485
5486 CTerrorPlayer["SetReviveOwner"] <- function(reviveOwner){SetPropEntity("m_reviveOwner", reviveOwner)}
5487 CTerrorPlayer["GetReviveOwner"] <- function(){return GetPropEntity("m_reviveOwner")}
5488
5489 CTerrorPlayer["SetCurrentUseAction"] <- function(currentUseAction){SetPropInt("m_iCurrentUseAction", currentUseAction.tointeger())}
5490 CTerrorPlayer["GetCurrentUseAction"] <- function(){return GetPropInt("m_iCurrentUseAction")}
5491
5492 CTerrorPlayer["SetUseActionTarget"] <- function(useActionTarget){SetPropEntity("m_useActionTarget", useActionTarget)}
5493 CTerrorPlayer["GetUseActionTarget"] <- function(){return GetPropEntity("m_useActionTarget")}
5494
5495 CTerrorPlayer["SetUseActionOwner"] <- function(useActionOwner){SetPropEntity("m_useActionOwner", useActionOwner)}
5496 CTerrorPlayer["GetUseActionOwner"] <- function(){return GetPropEntity("m_useActionOwner")}
5497
5498 CTerrorPlayer["SetNightvisionEnabled"] <- function(nightvisionEnabled){SetPropInt("m_bNightVisionOn", nightvisionEnabled.tointeger())}
5499 CTerrorPlayer["IsNightvisionEnabled"] <- function(){return GetPropInt("m_bNightVisionOn")}
5500
5501 CTerrorPlayer["SetTimescale"] <- function(timescale){SetPropFloat("m_flLaggedMovementValue", timescale.tofloat())}
5502 CTerrorPlayer["GetTimescale"] <- function(){return GetPropFloat("m_flLaggedMovementValue")}
5503
5504 CTerrorPlayer["SetDrawViewmodel"] <- function(drawViewmodel){SetPropInt("m_bDrawViewmodel", drawViewmodel.tointeger())}
5505 CTerrorPlayer["GetDrawViewmodel"] <- function(){return GetPropInt("m_bDrawViewmodel")}
5506
5507 CTerrorPlayer["SetFallVelocity"] <- function(fallVelocity){SetPropFloat("m_flFallVelocity", fallVelocity)}
5508 CTerrorPlayer["GetFallVelocity"] <- function(){return GetPropFloat("m_flFallVelocity")}
5509
5510 CTerrorPlayer["SetHideHUD"] <- function(hideHUD){SetPropInt("m_iHideHUD", hideHUD.tointeger())}
5511 CTerrorPlayer["AddHideHUD"] <- function(value){SetProp("m_iHideHUD", GetProp("m_iHideHUD") | value.tointeger())}
5512 CTerrorPlayer["RemoveHideHUD"] <- function(value){SetProp("m_iHideHUD", GetProp("m_iHideHUD") & ~value.tointeger())}
5513 CTerrorPlayer["GetHideHUD"] <- function(){return GetPropInt("m_iHideHUD")}
5514 CTerrorPlayer["HasHideHUD"] <- function(value){return GetProp("m_iHideHUD") & value.tointeger()}
5515
5516 CTerrorPlayer["SetViewmodel"] <- function(viewmodel){SetPropEntity("m_hViewModel", viewmodel)}
5517 CTerrorPlayer["GetViewmodel"] <- function(){return GetPropEntity("m_hViewModel")}
5518
5519 CTerrorPlayer["SetZoom"] <- function(zoom){SetPropInt("m_iFOV", zoom.tointeger())}
5520 CTerrorPlayer["GetZoom"] <- function(){return GetPropInt("m_iFOV")}
5521
5522 CTerrorPlayer["SetForcedObserverMode"] <- function(forcedObserverMode){SetPropInt("m_bForcedObserverMode", forcedObserverMode.tointeger())}
5523 CTerrorPlayer["GetForcedObserverMode"] <- function(){return GetPropInt("m_bForcedObserverMode")}
5524
5525 CTerrorPlayer["SetObserverTarget"] <- function(observerTarget){SetPropEntity("m_hObserverTarget", observerTarget)}
5526 CTerrorPlayer["GetObserverTarget"] <- function(){return GetPropEntity("m_hObserverTarget")}
5527
5528 CTerrorPlayer["SetObserverLastMode"] <- function(observerLastMode){SetPropInt("m_iObserverLastMode", observerLastMode.tointeger())}
5529 CTerrorPlayer["GetObserverLastMode"] <- function(){return GetPropInt("m_iObserverLastMode")}
5530
5531 CTerrorPlayer["SetObserverMode"] <- function(observerMode){SetPropInt("m_iObserverMode", observerMode.tointeger())}
5532 CTerrorPlayer["GetObserverMode"] <- function(){return GetPropInt("m_iObserverMode")}
5533
5534 CTerrorPlayer["SetSurvivorCharacter"] <- function(survivorCharacter){SetPropInt("m_survivorCharacter", survivorCharacters.tointeger())}
5535 CTerrorPlayer["GetSurvivorCharacter"] <- function(){return GetPropInt("m_survivorCharacter")}
5536
5537 CTerrorPlayer["SetCalm"] <- function(value){SetProp("m_isCalm", value.tointeger())}
5538 CTerrorPlayer["GetCalm"] <- function(){return GetPropInt("m_isCalm")}
5539
5540 CTerrorPlayer["SetCustomAbility"] <- function(customAbility){SetPropEntity("m_customAbility", customAbility)}
5541 CTerrorPlayer["GetCustomAbility"] <- function(){return GetPropEntity("m_customAbility")}
5542
5543 CTerrorPlayer["SetSurvivorGlowEnabled"] <- function(survivorGlowEnabled){SetPropInt("m_bSurvivorGlowEnabled", survivorGlowEnabled.tointeger())}
5544 CTerrorPlayer["GetSurvivorGlowEnabled"] <- function(){return GetProp("m_bSurvivorGlowEnabled")}
5545
5546 CTerrorPlayer["SetIntensity"] <- function(value){SetProp("m_clientIntensity", value.tointeger())}
5547 CTerrorPlayer["GetIntensity"] <- function(){return GetPropInt("m_clientIntensity")}
5548
5549 CTerrorPlayer["SetFallingFromLedge"] <- function(value){SetProp("m_isFallingFromLedge", value.tointeger())}
5550 CTerrorPlayer["GetFallingFromLedge"] <- function(){return GetPropInt("m_isFallingFromLedge")}
5551
5552 CTerrorPlayer["ClearJumpSuppression"] <- function(){SetPropFloat("m_jumpSupressedUntil", 0)}
5553 CTerrorPlayer["SuppressJump"] <- function(time){SetPropFloat("m_jumpSupressedUntil", Time() + time.tofloat())}
5554
5555 CTerrorPlayer["SetMaxHealth"] <- function(maxHealth){SetPropInt("m_iMaxHealth", maxHealth.tointeger())}
5556 CTerrorPlayer["GetMaxHealth"] <- function(){return GetProp("m_iMaxHealth")}
5557
5558 CTerrorPlayer["SetAirMovementRestricted"] <- function(airMovementRestricted){SetPropInt("m_airMovementRestricted", airMovementRestricted.tointeger())}
5559 CTerrorPlayer["GetAirMovementRestricted"] <- function(){return GetPropInt("m_airMovementRestricted")}
5560
5561 CTerrorPlayer["GetFlowDistance"] <- function(){return GetCurrentFlowDistanceForPlayer(this)}
5562 CTerrorPlayer["GetFlowPercent"] <- function(){return GetCurrentFlowPercentForPlayer(this)}
5563
5564 CTerrorPlayer["GetCharacterName"] <- function(){return GetCharacterDisplayName(this)}
5565
5566 CTerrorPlayer["Say"] <- function(message, teamOnly = false){::Say(this, message, teamOnly)}
5567
5568 CTerrorPlayer["IsBot"] <- function(){return IsPlayerABot(this)}
5569
5570 CTerrorPlayer["PickupObject"] <- function(entity){PickupObject(this, entity)}
5571
5572 CTerrorPlayer["SetAngles"] <- function(angles){
5573 local prevPlayerName = GetName()
5574 local playerName = UniqueString()
5575 SetName(playerName)
5576 local teleportEntity = SpawnEntityFromTable("point_teleport", {origin = GetOrigin(), angles = angles.ToKVString(), target = playerName, targetname = UniqueString()})
5577 DoEntFire("!self", "Teleport", "", 0, null, teleportEntity)
5578 DoEntFire("!self", "Kill", "", 0, null, teleportEntity)
5579 DoEntFire("!self", "AddOutput", "targetname " + prevPlayerName, 0.01, null, this)
5580 }
5581
5582 CTerrorPlayer["GetLifeState"] <- function(){return GetPropInt("m_lifeState")}
5583
5584 CTerrorPlayer["PlaySound"] <- function(soundName){EmitSoundOn(soundName, this)}
5585 CTerrorPlayer["StopSound"] <- function(soundName){StopSoundOn(soundName, this)}
5586
5587 CTerrorPlayer["PlaySoundOnClient"] <- function(soundName){EmitSoundOnClient(soundName, this)}
5588
5589 CTerrorPlayer["GetAmmo"] <- function(weapon){return GetPropIntArray("m_iAmmo", weapon.GetPropInt("m_iPrimaryAmmoType"))}
5590 CTerrorPlayer["SetAmmo"] <- function(weapon, ammo){SetPropIntArray("m_iAmmo", weapon.GetPropInt("m_iPrimaryAmmoType"), ammo)}
5591 }
5592
5593 foreach(ent in PlayerGenerator()){
5594 ent.GetPlayerName()
5595 break
5596 }
5597
5598 foreach(ent in EntitiesByOrder()){
5599 ent.GetName()
5600 break
5601 }
5602
5603 if(Time() >= 0.033){
5604 func_CBaseEntity()
5605 } else {
5606 DoNextTick(func_CBaseEntity)
5607 }
5608 if(Time() >= 6.2){
5609 func_CBaseAnimating()
5610 } else {
5611 ScheduleTask(func_CBaseAnimating, 6.2, {}, true)
5612 }
5613 if(Time() >= 8.73333){
5614 func_CTerrorPlayer()
5615 } else {
5616 ScheduleTask(func_CTerrorPlayer, 8.73333, {}, true)
5617 }
5618}
5619
5620/**
5621 * Registers a listener that will call a function when the given check function returns true
5622 */
5623function RegisterFunctionListener(checkFunction, callFunction, args, singleUse){
5624 local errorMessage = "Failed to register function listener"
5625 if(CheckType(checkFunction, VariableTypes.FUNCTION, errorMessage, "checkFunction")){
5626 if(CheckType(callFunction, VariableTypes.FUNCTION, errorMessage, "callFunction")){
5627 if(CheckType(args, VariableTypes.TABLE, errorMessage, "args")){
5628 if(CheckType(singleUse, VariableTypes.BOOLEAN, errorMessage, "singleUse")){
5629 functionListeners.append(FunctionListener(checkFunction, callFunction, args, singleUse))
5630 PrintInfo("Registered function listener")
5631 return true
5632 }
5633 }
5634 }
5635 }
5636 return false
5637}
5638
5639/**
5640 * Registers a custom weapon hook
5641 */
5642function RegisterCustomWeapon(viewmodel, worldmodel, script){
5643 local errorMessage = "Failed to register custom weapon"
5644 if(CheckType(viewmodel, VariableTypes.STRING, errorMessage, "viewmodel")){
5645 if(CheckType(worldmodel, VariableTypes.STRING, errorMessage, "worldmodel")){
5646 if(CheckType(script, VariableTypes.STRING, errorMessage, "script")){
5647 local errorMessage = "Failed to register a custom weapon script "
5648 local scriptScope = {}
5649 if(!IncludeScript(script, scriptScope)){
5650 PrintError(errorMessage + "(Could not include script)")
5651 return false
5652 }
5653 if(viewmodel.slice(viewmodel.len()-4) != ".mdl"){
5654 viewmodel = viewmodel + ".mdl"
5655 }
5656 if(worldmodel.slice(worldmodel.len()-4) != ".mdl"){
5657 worldmodel = worldmodel + ".mdl"
5658 }
5659 customWeapons.append(CustomWeapon(viewmodel,worldmodel,scriptScope))
5660 if("OnInitialize" in scriptScope){
5661 scriptScope["OnInitialize"]()
5662 }
5663 PrintInfo("Registered custom weapon script " + script)
5664 return scriptScope
5665 }
5666 }
5667 }
5668 return false
5669}
5670
5671/**
5672 * Registers various hooks
5673 */
5674function RegisterHooks(scriptScope){
5675 if(CheckType(scriptScope, [VariableTypes.TABLE, VariableTypes.INSTANCE], "Failed to register hooks", "scriptScope")){
5676 hookScripts.append(scriptScope)
5677 PrintInfo("Successfully registered hooks")
5678 return true
5679 }
5680 return false
5681}
5682
5683/**
5684 * Registers a function to be called every tick in scriptScope
5685 */
5686function RegisterOnTick(scriptScope){
5687 if(CheckType(scriptScope, [VariableTypes.TABLE, VariableTypes.INSTANCE], "Failed to register OnTick", "scriptScope")){
5688 tickScripts.append(scriptScope)
5689 PrintInfo("Registered OnTick")
5690 return true
5691 }
5692 return false
5693}
5694
5695/**
5696 * Registers a function to be called every tick
5697 */
5698function RegisterTickFunction(func){
5699 if(CheckType(func, VariableTypes.FUNCTION, "Failed to register a tick function", "func")){
5700 tickFunctions.append(func)
5701 PrintInfo("Registered tick function")
5702 return true
5703 }
5704 return false
5705}
5706
5707/**
5708 * Registers a function to be called when an entity is created
5709 */
5710function RegisterEntityCreateListener(classname, scope){
5711 local errorMessage = "Failed to register entity create listener"
5712 if(CheckType(classname, VariableTypes.STRING, errorMessage, "classname")){
5713 if(CheckType(scope, [VariableTypes.TABLE, VariableTypes.INSTANCE], errorMessage, "scope")){
5714 entityCreateListeners.append(EntityCreateListener(classname,scope))
5715 PrintInfo("Registered entity create listener on " + classname + " entities")
5716 return true
5717 }
5718 }
5719 return false
5720}
5721
5722/**
5723 * Registers a function to be called when an entity moves
5724 */
5725function RegisterEntityMoveListener(ent, scope){
5726 local errorMessage = "Failed to register entity move listener"
5727 if(CheckType(ent, VariableTypes.INSTANCE, errorMessage, "ent")){
5728 if(CheckType(scope, [VariableTypes.TABLE, VariableTypes.INSTANCE], errorMessage, "scope")){
5729 entityMoveListeners.append(EntityMoveListener(ent, scope))
5730 PrintInfo("Registered entity move listener on " + ent)
5731 return true
5732 }
5733 }
5734 return false
5735}
5736
5737/**
5738 * Registers a timer to be updated on the HUD
5739 */
5740function RegisterTimer(hudField, time, callFunction, countDown = true, formatTime = false){
5741 local errorMessage = "Failed to register timer"
5742 if(CheckType(hudField, VariableTypes.TABLE, errorMessage, "hudField")){
5743 if(CheckType(time, [VariableTypes.INTEGER, VariableTypes.FLOAT], errorMessage, "time")){
5744 if(CheckType(callFunction, VariableTypes.FUNCTION, errorMessage, "callFunction")){
5745 if(CheckType(countDown, VariableTypes.BOOLEAN, errorMessage, "countDown")){
5746 if(CheckType(formatTime, VariableTypes.BOOLEAN, errorMessage, "formatTime")){
5747 timers.append(Timer(hudField, time, callFunction, countDown, formatTime))
5748 PrintInfo("Registered hud timer")
5749 return true
5750 }
5751 }
5752 }
5753 }
5754 }
5755 return false
5756}
5757
5758/**
5759 * Stops a registered timer
5760 */
5761function StopTimer(hudField){
5762 if(CheckType(hudField, VariableTypes.TABLE, "Failed to stop timer", "hudField")){
5763 for(local i=0; i < timers.len(); i++){
5764 if(timers[i].GetHudField() == hudField){
5765 timers.remove(i)
5766 PrintInfo("Stopped timer")
5767 return true
5768 }
5769 }
5770 PrintInfo("Timer already stopped")
5771 return false
5772 }
5773 return false
5774}
5775
5776/**
5777 * Schedules a function to be called later
5778 */
5779function ScheduleTask(func, time, args = {}, timestamp = false){ // can only check every 33 milliseconds so be careful
5780 local errorMessage = "Failed to schedule task"
5781 if(CheckType(func, VariableTypes.FUNCTION, errorMessage, "func")){
5782 if(CheckType(time, [VariableTypes.INTEGER, VariableTypes.FLOAT], errorMessage, "time")){
5783 if(CheckType(args, VariableTypes.TABLE, errorMessage, "args")){
5784 if(CheckType(timestamp, VariableTypes.BOOLEAN, errorMessage, "timestamp")){
5785 if(time > 0){
5786 if(timestamp){
5787 tasks.append(Task(func, args, Time() + time))
5788 } else {
5789 tasks.append(Task(func, args, time))
5790 }
5791 PrintInfo("Registered a task to execute at " + (Time()+time))
5792 return true
5793 } else {
5794 PrintError("Failed to register task (Time has to be greater than 0)")
5795 return false
5796 }
5797 }
5798 }
5799 }
5800 }
5801 return false
5802}
5803
5804/**
5805 * Schedules a function to be called next tick
5806 */
5807function DoNextTick(func, args = {}){
5808 local errorMessage = "Failed to schedule next tick task"
5809 if(CheckType(func, VariableTypes.FUNCTION, errorMessage, "func")){
5810 if(CheckType(args, VariableTypes.TABLE, errorMessage, "args")){
5811 tasks.append(Task(func, args, Time() + 0.033))
5812 PrintInfo("Registered a task to execute next tick")
5813 return true
5814 }
5815 }
5816 return false
5817}
5818
5819/**
5820 * Registers a function to be called when a command is typed in chat
5821 */
5822function RegisterChatCommand(command, func, isInputCommand = false){
5823 local errorMessage = "Failed to register chat command"
5824 if(CheckType(command, VariableTypes.STRING, errorMessage, "command")){
5825 if(CheckType(func, VariableTypes.FUNCTION, errorMessage, "func")){
5826 if(CheckType(isInputCommand, VariableTypes.BOOLEAN, errorMessage, "isInputCommand")){
5827 chatCommands.append(ChatCommand(command, func, isInputCommand))
5828 PrintInfo("Registered chat command (isInput=" + isInputCommand + ", command=" + command + ")")
5829 return true
5830 }
5831 }
5832 }
5833 return false
5834}
5835
5836/**
5837 * Registers a function to be called when a convar is changed
5838 */
5839function RegisterConvarListener(convar, convarType, scope){
5840 local errorMessage = "Failed to register convar listener"
5841 if(CheckType(convar, VariableTypes.STRING, errorMessage, "convar")){
5842 if(CheckType(convarType, VariableTypes.STRING, errorMessage, "convarType")){
5843 if(CheckType(scope, [VariableTypes.TABLE, VariableTypes.INSTANCE], errorMessage, "scope")){
5844 convarListeners.append(ConvarListener(convar, convarType, scope))
5845 PrintInfo("Registered convar listener")
5846 return true
5847 }
5848 }
5849 }
5850 return false
5851}
5852
5853/**
5854 * Registers a function to be called when a bile jar explodes on the ground
5855 */
5856function RegisterBileExplodeListener(scope){
5857 if(CheckType(scope, [VariableTypes.TABLE, VariableTypes.INSTANCE], "Failed to register bile explode listener", "scope")){
5858 bileExplodeListeners.append(ThrowableExplodeListener(scope))
5859 PrintInfo("Registered a bile explode listener")
5860 return true
5861 }
5862 return false
5863}
5864
5865/**
5866 * Registers a function to be called when a molotov explodes on the ground
5867 */
5868function RegisterMolotovExplodeListener(scope){
5869 if(CheckType(scope, [VariableTypes.TABLE, VariableTypes.INSTANCE], "Failed to register molotov explode listener", "scope")){
5870 molotovExplodeListeners.append(ThrowableExplodeListener(scope))
5871 PrintInfo("Registered a molotov explode listener")
5872 return true
5873 }
5874 return false
5875}
5876
5877/**
5878 * Locks an entity by constantly setting its position
5879 */
5880function LockEntity(entity){
5881 if(CheckType(entity, VariableTypes.INSTANCE, "Failed to lock entity", "entity")){
5882 lockedEntities.append(LockedEntity(entity, entity.GetAngles(), entity.GetOrigin))
5883 PrintInfo("Locked entity: " + entity)
5884 return true
5885 }
5886 return false
5887}
5888
5889/**
5890 * Unlocks a previously locked entity
5891 */
5892function UnlockEntity(entity){
5893 if(CheckType(entity, VariableTypes.INSTANCE, "Failed to unlock entity", "entity")){
5894 for(local i=0; i < lockedEntities.len(); i++){
5895 if(lockedEntities[i] == entity){
5896 lockedEntities.remove(i)
5897 return true
5898 }
5899 }
5900 return true
5901 }
5902 return false
5903}
5904
5905function SetTimescale(timescale){
5906 if(CheckType(timescale, [VariableTypes.FLOAT, VariableTypes.INTEGER], "Failed to set timescale", "timescale")){
5907 DoEntFire("!self", "AddOutput", "desiredTimescale " + timescale, 0, null, timescaleEnt)
5908 DoEntFire("!self", "Start", "", 0, null, timescaleEnt)
5909 return true
5910 }
5911 return false
5912}
5913
5914
5915function PlayerGenerator(){
5916 local ent = null
5917 while(ent = Entities.FindByClassname(ent, "player")){
5918 yield ent
5919 }
5920}
5921
5922function EntitiesByClassname(classname){
5923 local ent = null
5924 while(ent = Entities.FindByClassname(ent, classname)){
5925 yield ent
5926 }
5927}
5928
5929function EntitiesByClassnameWithin(classname, origin, radius){
5930 local ent = null
5931 while(ent = Entities.FindByClassnameWithin(ent, classname, origin, radius)){
5932 yield ent
5933 }
5934}
5935
5936function EntitiesByModel(model){
5937 local ent = null
5938 while(ent = Entities.FindByModel(ent, model)){
5939 yield ent
5940 }
5941}
5942
5943function EntitiesByName(name){
5944 local ent = null
5945 while(ent = Entities.FindByName(ent, name)){
5946 yield ent
5947 }
5948}
5949
5950function EntitiesByNameWithin(name, origin, radius){
5951 local ent = null
5952 while(ent = Entities.FindByNameWithin(ent, name, origin, radius)){
5953 yield ent
5954 }
5955}
5956
5957function EntitiesByTarget(targetname){
5958 local ent = null
5959 while(ent = Entities.FindByTarget(ent, targetname)){
5960 yield ent
5961 }
5962}
5963
5964function EntitiesInSphere(origin, radius){
5965 local ent = null
5966 while(ent = Entities.FindInSphere(ent, origin, radius)){
5967 yield ent
5968 }
5969}
5970
5971function EntitiesByOrder(){
5972 local ent = null
5973 while(ent = Entities.Next(ent)){
5974 yield ent
5975 }
5976}
5977
5978
5979function GetPlayers(){
5980 local entities = []
5981 local ent = null
5982 while(ent = Entities.FindByClassname(ent, "player")){
5983 entities.append(ent)
5984 }
5985 return entities
5986}
5987
5988function EntitiesByClassnameAsArray(classname){
5989 local entities = []
5990 local ent = null
5991 while(ent = Entities.FindByClassname(ent, classname)){
5992 entities.append(ent)
5993 }
5994 return entities
5995}
5996
5997function EntitiesByClassnameWithinAsArray(classname, origin, radius){
5998 local entities = []
5999 local ent = null
6000 while(ent = Entities.FindByClassnameWithin(ent, classname, origin, radius)){
6001 entities.append(ent)
6002 }
6003 return entities
6004}
6005
6006function EntitiesByModelAsArray(model){
6007 local entities = []
6008 local ent = null
6009 while(ent = Entities.FindByModel(ent, model)){
6010 entities.append(ent)
6011 }
6012 return entities
6013}
6014
6015function EntitiesByNameAsArray(name){
6016 local entities = []
6017 local ent = null
6018 while(ent = Entities.FindByName(ent, name)){
6019 entities.append(ent)
6020 }
6021 return entities
6022}
6023
6024function EntitiesByNameWithinAsArray(name, origin, radius){
6025 local entities = []
6026 local ent = null
6027 while(ent = Entities.FindByNameWithin(ent, name, origin, radius)){
6028 entities.append(ent)
6029 }
6030 return entities
6031}
6032
6033function EntitiesByTargetAsArray(targetname){
6034 local entities = []
6035 local ent = null
6036 while(ent = Entities.FindByTarget(ent, targetname)){
6037 entities.append(ent)
6038 }
6039 return entities
6040}
6041
6042function EntitiesInSphereAsArray(origin, radius){
6043 local entities = []
6044 local ent = null
6045 while(ent = Entities.FindInSphere(ent, origin, radius)){
6046 entities.append(ent)
6047 }
6048 return entities
6049}
6050
6051/*
6052 This might be expensive
6053*/
6054function EntitiesByOrderAsArray(){
6055 local entities = []
6056 local ent = null
6057 while(ent = Entities.Next(ent)){
6058 entities.append(ent)
6059 }
6060 return entities
6061}
6062
6063
6064/*
6065function OnGameEvent_tongue_grab(params){
6066 PlayerRestricted(params.victim)
6067}
6068function OnGameEvent_choke_start(params){
6069 PlayerRestricted(params.victim)
6070}
6071function OnGameEvent_lunge_pounce(params){
6072 PlayerRestricted(params.victim)
6073}
6074function OnGameEvent_charger_carry_start(params){
6075 PlayerRestricted(params.victim)
6076}
6077function OnGameEvent_charger_pummel_start(params){
6078 PlayerRestricted(params.victim)
6079}
6080function OnGameEvent_jockey_ride(params){
6081 PlayerRestricted(params.victim)
6082}
6083function OnGameEvent_tongue_release(params){
6084 if("victim" in params)
6085 {
6086 PlayerReleased(params.victim)
6087 }
6088}
6089function OnGameEvent_choke_end(params){
6090 if("victim" in params)
6091 {
6092 PlayerReleased(params.victim)
6093 }
6094}
6095function OnGameEvent_pounce_end(params){
6096 if("victim" in params)
6097 {
6098 PlayerReleased(params.victim)
6099 }
6100}
6101function OnGameEvent_pounce_stopped(params){
6102 if("victim" in params)
6103 {
6104 PlayerReleased(params.victim)
6105 }
6106}
6107function OnGameEvent_charger_carry_end(params){
6108 if("victim" in params)
6109 {
6110 PlayerReleased(params.victim)
6111 }
6112}
6113function OnGameEvent_charger_pummel_end(params){
6114 if("victim" in params)
6115 {
6116 PlayerReleased(params.victim)
6117 }
6118}
6119function OnGameEvent_jockey_ride_end(params){
6120 if("victim" in params)
6121 {
6122 PlayerReleased(params.victim)
6123 }
6124}
6125function PlayerRestricted(playerId){
6126 local player = FindPlayerObject(GetPlayerFromUserID(playerId))
6127 if(player != null){
6128 player.SetDisabled(true)
6129 }
6130}
6131function PlayerReleased(playerId){
6132 local player = FindPlayerObject(GetPlayerFromUserID(playerId))
6133 if(player != null){
6134 player.SetDisabled(false)
6135 }
6136}
6137*/
6138
6139/**
6140 * Returns true if the message matches the specified command
6141 */
6142local function IsCommand(msg, command){
6143 local message = ""
6144 local found_start = false
6145 local found_end = false
6146 local last_char = 0
6147 foreach(char in msg){
6148 if(char != Characters.SPACE && char != Characters.NEWLINE){
6149 if(!found_start){
6150 found_start = true
6151 }
6152 message += char.tochar()
6153 } else if(char == Characters.SPACE){
6154 if(last_char != Characters.SPACE){
6155 found_end = true
6156 }
6157 if(found_start && !found_end){
6158 message += char.tochar()
6159 }
6160 }
6161 }
6162 return message == command
6163}
6164
6165/**
6166 * Returns input if the message matches the command, otherwise returns false
6167 */
6168local function GetInputCommand(msg, command){
6169 local message = ""
6170 local found_start = false
6171 local found_end = false
6172 local last_char = 0
6173 local index = 0
6174 foreach(char in msg){
6175 if(char != Characters.SPACE && char != Characters.NEWLINE){
6176 if(!found_start){
6177 found_start = true
6178 }
6179 message += char.tochar()
6180 } else if(char == Characters.SPACE){
6181 if(last_char != Characters.SPACE){
6182 found_end = true
6183 if(message != command || index == msg.len() - 1){
6184 return false
6185 }
6186 return msg.slice(index + 1, msg.len())
6187 }
6188 if(found_start && !found_end){
6189 message += char.tochar()
6190 }
6191 }
6192 index += 1
6193 }
6194 return false
6195}
6196
6197
6198function OnGameEvent_player_say(params){
6199 local text = params["text"]
6200 local ent = GetPlayerFromUserID(params["userid"])
6201
6202 foreach(command in chatCommands){
6203 if(command.IsInputCommand()){
6204 local input = GetInputCommand(text, command.GetCommand())
6205 if(input != false){
6206 command.CallFunction(ent, input)
6207 }
6208 } else {
6209 if(IsCommand(text, command.GetCommand())){
6210 command.CallFunction(ent)
6211 }
6212 }
6213 }
6214}
6215
6216__CollectEventCallbacks(this, "OnGameEvent_", "GameEventCallbacks", RegisterScriptGameEventListener)
6217
6218
6219
6220printl(
6221"*******************************************\n" +
6222"* HookController loaded *\n" +
6223"* Made by Daroot Leafstorm *\n" +
6224"*******************************************"
6225)