Jump to content

Проблема с открытием ворот по скину


Recommended Posts

1 Проблема С открытием ворот по скину. Скрипт открывает ворота только для скина "280", а надо что бы открывало для несколько скинов например: 280, 281, 282. Пробовал по разному не получается.

2 Проблема "outputChatBox" - пишет у всех игроков в чате при открытие, а не у одного кто открыл ворота.

Вот код:

ls_gate1 = createObject ( 978, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 90 ) 
  
function openls_gate(thePlayer) 
if getElementModel( thePlayer ) == 280 then 
       moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 11.699999809265, 0, 0, 0 ) 
       outputChatBox ("Ворота открыты", source, 230, 100, 100 ) 
end 
end 
addCommandHandler ( "lsopen", openls_gate ) 
  
function closels_gate(thePlayer) 
if getElementModel( thePlayer ) == 280 then 
       moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 0 ) 
       outputChatBox ("Ворота закрыты", source, 230, 100, 100 ) 
end 
end 
addCommandHandler ( "lsclose", closels_gate ) 

Link to comment
ls_gate1 = createObject ( 978, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 90 ) 
  
function openls_gate(thePlayer) 
local p_model = getElementModel( thePlayer ) 
if ( p_model == 280 ) or ( p_model == 281 ) or ( p_model == 282 ) then 
       moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 11.699999809265, 0, 0, 0 ) 
       outputChatBox ("Ворота открыты", thePlayer, 230, 100, 100 ) 
end 
end 
addCommandHandler ( "lsopen", openls_gate ) 
  
function closels_gate(thePlayer) 
local p_model = getElementModel( thePlayer ) 
if ( p_model == 280 ) or ( p_model == 281 ) or ( p_model == 282 ) then 
       moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 0 ) 
       outputChatBox ("Ворота закрыты", thePlayer, 230, 100, 100 ) 
end 
end 
addCommandHandler ( "lsclose", closels_gate ) 

Link to comment
ls_gate1 = createObject ( 978, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 90 ) функция openls_gate(thePlayer) местных p_model = getElementModel( thePlayer ) если ( p_model == 280 ) или ( p_model == 281 ) или ( p_model == 282), то moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 11.699999809265, 0, 0, 0 ) outputChatBox ("Ворота открыты", thePlayer, 230, 100, 100 ) end end addCommandHandler ( "lsopen", openls_gate ) функция closels_gate(thePlayer) местных p_model = getElementModel( thePlayer ) если ( p_model == 280 ) или ( p_model == 281 ) или ( p_model == 282), то moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 0 ) outputChatBox ("Ворота закрыты", thePlayer, 230, 100, 100 ) end end addCommandHandler ( "lsclose", closels_gate ) 

Спасибо тебе! :wink:

Link to comment
ls_gate1 = createObject ( 978, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 90 ) функция openls_gate(thePlayer) местных p_model = getElementModel( thePlayer ) если ( p_model == 280 ) или ( p_model == 281 ) или ( p_model == 282), то moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 11.699999809265, 0, 0, 0 ) outputChatBox ("Ворота открыты", thePlayer, 230, 100, 100 ) end end addCommandHandler ( "lsopen", openls_gate ) функция closels_gate(thePlayer) местных p_model = getElementModel( thePlayer ) если ( p_model == 280 ) или ( p_model == 281 ) или ( p_model == 282), то moveObject (ls_gate1, 1000, 1541.8000488281, -1627.9000244141, 13.199999809265, 0, 0, 0 ) outputChatBox ("Ворота закрыты", thePlayer, 230, 100, 100 ) end end addCommandHandler ( "lsclose", closels_gate ) 

память

1LuaC

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...