Jump to content

[Вопрос]Как сделать


Recommended Posts

Привет всем, подскажите как сделать что бы ped реагировал на Click по нему?

юзал wiki, но там нашел только Click на GUI.

Буду очень признателен тем кто поможет

Так же есть вопрос о организации проверки E-Mail'a на валидность. Не понимаю как это сделать.

Вот что у меня получилось только:

function valid_email (resource) 
email = "" 
if(string.find(email, '((...)@)')<4) then 
guiSetText(GUILabel[11], "Не верно введен E-Mail") 
end 

Link to comment

Тебе уже подсказывали.

function onPedClick(button, state, absX, absY, wx, wy, wz, element) 
    if (element and getElementType(element) == "ped" and state=="down") then 
        local x, y, z = getElementPosition(localPlayer) 
        if (getDistanceBetweenPoints3D(x, y, z, wx, wy, wz) <=3) then 
            guiSetVisible(myGUIElement, true) 
        end 
    end 
end 
addEventHandler("onClientClick", getRootElement(), onPedClick) 

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...