Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cFunc["calculate_pongpos"] = function()
- if(cSetting["enabled"] == true) then
- if(cSetting["pong_state"] == 1) then
- cSetting["pong_posx"] = cSetting["pong_posx"]-cSetting["pong_speed"]
- elseif(cSetting["pong_state"] == 2) then
- elseif(cSetting["pong_state"] == 3) then
- cSetting["pong_posx"] = cSetting["pong_posx"]+cSetting["pong_speed"]
- cSetting["pong_posy"] = cSetting["pong_posy"]+cSetting["pong_yadd"]
- elseif(cSetting["pong_state"] == 4) then
- elseif(cSetting["pong_state"] == 5) then
- cSetting["pong_posx"] = cSetting["pong_posx"]+cSetting["pong_speed"]
- cSetting["pong_posy"] = cSetting["pong_posy"]-cSetting["pong_yadd"]
- elseif(cSetting["pong_state"] == 6) then
- end
- -- PONG CHECK --
- -- PLAYERCHECK --
- local y1 = cSetting["player_1_pos"]
- local y2 = cSetting["pong_posy"]
- local distanzZurMitte = math.floor((y1-y2)+((151/aesy*sy)/2)-(25/aesy*sy)/2) -- WTF :D
- --local dis = math.floor((getDistanceBetweenPoints2D((48/aesx*sx), y2-distanzZurMitte/2, cSetting["pong_posx"], cSetting["pong_posy"])))
- --if(distanzZurMitte < 88/aesy*sy) and (dis <= 19/aesx*sx) then
- if(cSetting["pong_posx"]-48/aesx*sx < 25/aesx*sx) then
- if(distanzZurMitte/2 > 44/aesy*sy) then
- cSetting["pong_state"] = 3 -- Rechts oben
- else
- cSetting["pong_state"] = 5 -- Rechts unten
- end
- cSetting["pong_yadd"] = (distanzZurMitte/10)
- end
- dxDrawText(cSetting["pong_yadd"], 500/aesx*sx, 60/aesy*sy, 1355/aesx*sx, 169/aesy*sy, tocolor(255, 255, 255, 255), 4/(aesx+aesy)*(sx+sy), "pricedown", "center", "center", false, false, true, false, false)
- -- RAENDER CHECK --
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement