add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
20
gamedata/scripts/zone_no_weapon.script
Normal file
20
gamedata/scripts/zone_no_weapon.script
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
----------------------------------------------------------------------------------------------------------------------
|
||||
-- Êëàññ CZoneNoWeapon. Ïðè âõîäå èãðîêà â çîíó, ó íåãî óáèðàåòñÿ îðóæèå. Ïðè âûõîäå - äîñòàåòñÿ
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
class "CZoneNoWeapon"
|
||||
|
||||
function CZoneNoWeapon:__init( zone, binder, ini )
|
||||
-- Åñëè óæå åñòü àêòåð è îí â çîíå, òî óáèðàåì îðóæèå
|
||||
if binder.actor_inside then
|
||||
db.actor:hide_weapon()
|
||||
end
|
||||
end
|
||||
|
||||
function CZoneNoWeapon:on_enter( actor )
|
||||
actor:hide_weapon()
|
||||
end
|
||||
|
||||
function CZoneNoWeapon:on_leave( actor )
|
||||
actor:restore_weapon()
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue