Jump to content

Problema con onClientClick


.:HyPeX:.

Recommended Posts

Ya lo eh posteado en ingles, quizas alguien en español me pueda ayudar, no se selecciona Engineer, pero todas las demas si, y no encuentro el error.

  
  
function DeployMetClick(button, state) 
if state == "up" then 
return 
end 
local CursorX, CursorY = getCursorPosition() 
if CursorX > 0.79 and CursorY > 0.917 then 
if CursorX < 0.96 and CursorY < 0.96 then 
Deploy() 
outputConsole("DEPLOYED") 
end 
end 
  
if CursorX > 0.00600 and CursorY > 0.809 then 
if CursorX < 0.07050 and CursorY < 0.898 then 
setElementData(getLocalPlayer(), "Class", "Medic") 
outputConsole("Medic") 
end 
end 
  
if CursorX > 0.07426 and CursorY > 0.8098 then 
if CursorX < 0.01367 and CursorY < 0.8971 then 
setElementData(getLocalPlayer(), "Class", "Engineer") 
outputConsole("Engineer") 
end 
end 
  
if CursorX > 0.14100 and CursorY > 0.809 then 
if CursorX < 0.20400 and CursorY < 0.898 then 
setElementData(getLocalPlayer(), "Class", "Assault") 
outputConsole("Assault") 
end 
end 
  
if CursorX > 0.20800 and CursorY > 0.809 then 
if CursorX < 0.27100 and CursorY < 0.898 then 
setElementData(getLocalPlayer(), "Class", "Sniper") 
outputConsole("Sniper") 
end 
end 
  
end 
addEventHandler("onClientClick", getRootElement(), DeployMetClick) 

Link to comment
Ya lo eh posteado en ingles, quizas alguien en español me pueda ayudar, no se selecciona Engineer, pero todas las demas si, y no encuentro el error.
  
  
function DeployMetClick(button, state) 
if state == "up" then 
return 
end 
local CursorX, CursorY = getCursorPosition() 
if CursorX > 0.79 and CursorY > 0.917 then 
if CursorX < 0.96 and CursorY < 0.96 then 
Deploy() 
outputConsole("DEPLOYED") 
end 
end 
  
if CursorX > 0.00600 and CursorY > 0.809 then 
if CursorX < 0.07050 and CursorY < 0.898 then 
setElementData(getLocalPlayer(), "Class", "Medic") 
outputConsole("Medic") 
end 
end 
  
if CursorX > 0.07426 and CursorY > 0.8098 then 
if CursorX < 0.01367 and CursorY < 0.8971 then 
setElementData(getLocalPlayer(), "Class", "Engineer") 
outputConsole("Engineer") 
end 
end 
  
if CursorX > 0.14100 and CursorY > 0.809 then 
if CursorX < 0.20400 and CursorY < 0.898 then 
setElementData(getLocalPlayer(), "Class", "Assault") 
outputConsole("Assault") 
end 
end 
  
if CursorX > 0.20800 and CursorY > 0.809 then 
if CursorX < 0.27100 and CursorY < 0.898 then 
setElementData(getLocalPlayer(), "Class", "Sniper") 
outputConsole("Sniper") 
end 
end 
  
end 
addEventHandler("onClientClick", getRootElement(), DeployMetClick) 

Al seleccionar Enginer, algun debug?

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...