Jump to content

Problema con onClientClick


.:HyPeX:.

Recommended Posts

Posted

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) 

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted
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?

Currently developing for International Gaming Community - Join us!

Posted
La variable 'CursorX' no puede ser, al mismo tiempo, mayor a 0.07426 y menor que 0.01367.

Que raro, la copie exactamente como me la setio al clipboard mi función, vere de buscarlas denuevo.

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

  • Recently Browsing   0 members

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