القائمة السحرية

Botchy

Mouse
Code:
p={}

function eventNewPlayer(n)
    p[n]={fly=false,speed=false,jump=false,tp=false}
    ui.addTextArea(0, "<p align='center'><b><a href='event:fly'>طيران</a>\n<a href='event:speed'>سرعة</a>\n<a href='event:jump'>قفز</a>\n<a href='event:tp'>انتقال</a>", n, 9, 328, 52, 63, 0x324650, 0x000000, 1, true)
    for k=0,100 do
        system.bindKeyboard(n,k,true,true)
    end
    system.bindMouse(n,true)
end
table.foreach(tfm.get.room.playerList,eventNewPlayer)

function eventTextAreaCallback(id,n,cb)
    if p[n][cb] then
        p[n][cb]=false
    else
        p[n][cb]=true
    end
end

function eventKeyboard(n,k,d,x,y)
    if k==38 and p[n].fly then
   tfm.exec.movePlayer(n,0,0,false,0,-40,false)

    elseif k==39 and p[n].speed then
      tfm.exec.movePlayer(n,0,0,false,100,0,false)

       elseif k==37 and p[n].speed then
      tfm.exec.movePlayer(n,0,0,false,-100,0,false)

    elseif k==32 and p[n].jump then
   tfm.exec.movePlayer(n,0,0,false,0,-230,false)

    end
end

function eventMouse(n,x,y)
    if p[n].tp then
        tfm.exec.movePlayer(n,x,y)
    end
end
Code:
 

Erin1

Cheesus
مفيد
 
Top
"Dev-TR" theme by Soulzone