Jump to content

[HELP]


Recommended Posts

Is it client or server side?

In the if statement , instead of

Quote

getElementModel(skin)

Type skin

And it should work now
 

Btw there is some mistakes in your script ,
`setElementModel(*tehPalyer*,266)`
instead of tehPalyer i think you mean thePlayer
but thePlayer is nil here because you are client sided you should use localPlayer

Link to comment

function GetMyPosition()
local  x,y,z = getElementPosition(localPlayer)
local int = getElementInterior(localPlayer)
local dim = getElementDimension(localPlayer)
local skin = getElementModel(localPlayer)
  if not skin or not skin == 1 then outputChatBox("Nincs engedélyed hozzá") return end
setClipboard(x..", "..y..", "..z.." "..int..", "..dim)
outputChatBox("Kordinátád sikeressen kimásolva a vágólapra ")
end

addCommandHandler("GetMyPos", GetMyPosition, false, false)

function alert ()
local name = getPlayerName(localPlayer)
local sound = playSound("alert.mp3") -- Play wasted.mp3 from the sounds folder
    setSoundVolume(sound, 1) -- Set the sound volume to 50%
 if not skin or not skin == 1 then outputChatBox("Nincs engedélyed hozzá") return end
outputChatBox("HLR felhivás "..name.." megnyitotta váróját! Lehet jönni ha bármi segítség kell!")
end
addCommandHandler("alert", alert, false, false) 

function duty () 
setElementModel(thePalyer, 266) 
end
addCommandHandler("aduty", duty, false, false) 

Link to comment

Try this 
 

function GetMyPosition()
local skin = getElementModel(localPlayer)
if skin == 1 then 
local  x,y,z = getElementPosition(localPlayer)
local int = getElementInterior(localPlayer)
local dim = getElementDimension(localPlayer)
setClipboard(x..", "..y..", "..z.." "..int..", "..dim)
outputChatBox("Kordinátád sikeressen kimásolva a vágólapra ")
else
outputChatBox("Nincs engedélyed hozzá")
end
end
addCommandHandler("GetMyPos", GetMyPosition, false, false)

 

Link to comment
function alert ()
local skin = getElementModel(localPlayer)
if skin == 1 then 
local name = getPlayerName(localPlayer)
local sound = playSound("alert.mp3") -- Play wasted.mp3 from the sounds folder
    setSoundVolume(sound, 1) -- Set the sound volume to 50%
outputChatBox("HLR felhivás "..name.." megnyitotta váróját! Lehet jönni ha bármi segítség kell!")
else
outputChatBox("Nincs engedélyed hozzá") 
end
end
addCommandHandler("alert", alert, false, false) 

function duty () 
setElementModel(localPlayer, 266) 
end
addCommandHandler("aduty", duty, false, false) 

I did the if statement for the skin , to your "alert" command
And i corrected the aduty command fuction because you was using thePalyer and it does not mean anything
you should use localPlayer because you are using client side

Link to comment
There is a function from there, I would like to do it so that if you move the mouse to that coordinate, the button will light up, but I don't know how to calculate the coordinate so that it is "gomb1"
 
 
 
The function I use to calculate the coordinates is IsInBox
 
 
 
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...