Jump to content

كيف اضيف اغنية للقيم مود


Recommended Posts

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

أي مقطع صوتي

طب شو بحط مشان لما القيم مود يبداء الي لحد ما ينتهي

بدل من onplayerwasted

اقصد الفنكشات

function wasted (killer, weapon, bodypart) <-- هون شو بحط

local sound = playSound("sounds/wasted<-- وهون اسم الاغنية .mp3") --Play wasted.mp3 from the sounds folder

setSoundVolume(sound, 0.5) -- set the sound volume to 50%

end

addEventHandler("onClientPlayerWasted<-- وايضا هون شو بحط ", localPlayer, wasted)

Link to comment
هذا مجرد مثآل تطبقه أنت حطه تشغيل الصوت عند بدأ السكربت وسحب الصوت عند الأنتهاء من السكربت أو الوقت الي تبيه ذذذذ

هاي الكلينكت

  
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function camRender ()
    if sm.object1 and isElement(sm.object1) then
        local x1, y1, z1 = getElementPosition ( sm.object1 )
        local x2, y2, z2 = getElementPosition ( sm.object2 )
        setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
    end
end
 
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end
 
function centerWindow(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
addEventHandler("onClientResourceStart",resourceRoot,
    function ()
        setTimer(function ()
            if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end
            dx = true    
            setCameraMatrix(-2684.654296875,1933.3981933594,185.04570007324,-2684.6457519531,1932.5715332031,184.48304748535)
            setTime(1,0)
            showCursor(true)
            guiSetInputEnabled(true)
            fadeCamera(true)
            showChat(false)
            setElementDimension(localPlayer,0)
            setElementData(localPlayer,"new",false)
            outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true)
        end,500,1)
    end
)
 
wnd = guiCreateStaticImage(0,-268,389,268,"abed.png",false)
english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",true,wnd)
guiSetFont(english,"default-bold-small")
setTimer(function()
guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
arabic = guiCreateButton(0.0848,0.0284,0.0566,0.1082,"Ar",true,wnd)
guiSetFont(arabic,"default-bold-small")
setTimer(function()
guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
user_l = guiCreateLabel(0.0206,0.1903,0.9614,0.0784,"Username",true,wnd)
function Color ( )
guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(user_l,"center",false)
guiSetFont(user_l,"default-bold-small")
user = guiCreateEdit(0.0231,0.2724,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
pass_l = guiCreateLabel(0.0206,0.4216,0.9614,0.0784,"Password",true,wnd)
function Color ( )
guiLabelSetColor (pass_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(pass_l,"center",false)
guiSetFont(pass_l,"default-bold-small")
pass = guiCreateEdit(0.0231,0.5187,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(pass, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 100, 0)
guiEditSetMasked(pass,true)
remember = guiCreateCheckBox(0.0231,0.6642,0.3728,0.0746,"Remember Me !!",false,true,wnd)
guiSetFont(remember,"default-bold-small")
setTimer(function()
guiSetProperty(remember, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
reg = guiCreateButton(0.5244,0.7724,0.3239,0.153,"Register",true,wnd)
guiSetFont(reg,"default-bold-small")
setTimer(function()
guiSetProperty(reg, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
login = guiCreateButton(0.144,0.7724,0.3239,0.153,"Login",true,wnd)
guiSetFont(login,"default-bold-small")
setTimer(function()
guiSetProperty(login, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
centerWindow(wnd)
triggerServerEvent("onGetSave",localPlayer)
 
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
    function (puser,ppass)
        guiSetText(user,puser)
        guiSetText(pass,ppass)
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        if ( source == ex ) then
            guiSetVisible(wnd,false)
            showCursor(false)
            guiSetInputEnabled(false)
            Show()
        elseif ( source == english ) then
            guiSetText(user_l,"Username")
            guiSetText(pass_l,"Password")
            guiSetText(login,"Login")
            guiSetText(reg,"Register")
            guiSetText(remember,"Remember Me !!")
        elseif ( source == arabic ) then
            guiSetText(user_l,"اسم المستخدم")
            guiSetText(pass_l,"كلمه المرور")
            guiSetText(login,"تسجيل الدخول")
            guiSetText(reg,"حساب جديد")
            guiSetText(remember,"تذكرني")
        end
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        local user = guiGetText(user)
        local pass = guiGetText(pass)
        if ( source == login ) then
            if user ~= "" and pass ~= "" then
                if guiCheckBoxGetSelected(remember) then
                    triggerServerEvent("onLoginWith",localPlayer,user,pass)
                else
                    triggerServerEvent("onLogin",localPlayer,user,pass)
                end
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        elseif ( source == reg ) then
            if user ~= "" and pass ~= "" then
                triggerServerEvent("onReg",localPlayer,user,pass)
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        end
    end
)
 
addEvent("onCl",true)
addEventHandler("onCl",root,
    function ()
        guiSetVisible(wnd,false)
        showCursor(false)
        guiSetInputEnabled(false)
        Show()
    end
)
 
function setPlayerXYZ(x,y,z)
    local player = getLocalPlayer()
    setElementData(player,"x",x)
    setElementData(player,"y",y)
    setElementData(player,"z",z)
end
 
text = "~( حياكم الله في وناسة مصر )~"
dx = false
skin = {{46,"ثوب ابيض"},{0,"cj"},{181,"شخصية كوول"},{230,"شحات"}}
num = 1
place = {
    {"النخيل",2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801,2119.56250,1396.94238,10.81252},
    {"الدائري",1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996,1686.27844,1400.07080,10.74839},
    {"ساحة القتال",414.17388916016,2046.4881591797,61.682598114014,413.30380249023,2046.0771484375,61.410533905029,277.93359,1988.82581,17.64063},
    {"البداية",-2722.78125,-7649.55859375,29.089599609375,-2722.8061523438,-7650.5581054688,29.066226959229,-2730.98242,-7836.83105,8.25537},
    {"الطعس",439.50900268555,-1871.9624023438,43.744899749756,438.60696411133,-1871.5866699219,43.532466888428,305.20020,-1840.30493,3.60009}
}
--[[
1-   -2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506
2-   -2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612
     -2649.80957,376.06485,14.30767
]]--[[
    2086.59619,1472.00696,10.82031
    2040.5595703125,1424.5876464844,38.590599060059,2040.6915283203,1425.5034179688,38.211277008057
----------------------------------------------------------------------------------------------------------------
    2109.34326,1549.89893,10.82031
    2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801
    1686.27844 1400.07080 10.74839
    1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996
   
]]
function Show()
    smoothMoveCamera(-2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506,-2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612,2000)
    ped = createPed(skin[1][1],-2649.80957,376.06485,14.30767,90)
    bindKey("arrow_l","down",left)
    bindKey("arrow_r","down",right)
    bindKey("enter","down",enter)
    text = skin[1][2]
end
function left()
    if num == 1 then
        num = #skin
    else
        num = num - 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function right()
    if num == #skin then
        num = 1
    else
        num = num + 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function enter()
    playSoundFrontEnd(33)
    destroyElement(ped)
    unbindKey("arrow_l")
    unbindKey("arrow_r")
    unbindKey("enter")
   
Link to comment

  
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function camRender ()
    if sm.object1 and isElement(sm.object1) then
        local x1, y1, z1 = getElementPosition ( sm.object1 )
        local x2, y2, z2 = getElementPosition ( sm.object2 )
        setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
    end
end
 
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end
 
function centerWindow(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
addEventHandler("onClientResourceStart",resourceRoot,
    function ()
        setTimer(function ()
            if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end
            dx = true    
            setCameraMatrix(-2684.654296875,1933.3981933594,185.04570007324,-2684.6457519531,1932.5715332031,184.48304748535)
            playSound ("ss.mp3",true)
            setTime(1,0)
            showCursor(true)
            guiSetInputEnabled(true)
            fadeCamera(true)
            showChat(false)
            setElementDimension(localPlayer,0)
            setElementData(localPlayer,"new",false)
            outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true)
        end,500,1)
    end
)
 
wnd = guiCreateStaticImage(0,-268,389,268,"abed.png",false)
english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",true,wnd)
guiSetFont(english,"default-bold-small")
setTimer(function()
guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
arabic = guiCreateButton(0.0848,0.0284,0.0566,0.1082,"Ar",true,wnd)
guiSetFont(arabic,"default-bold-small")
setTimer(function()
guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
user_l = guiCreateLabel(0.0206,0.1903,0.9614,0.0784,"Username",true,wnd)
function Color ( )
guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(user_l,"center",false)
guiSetFont(user_l,"default-bold-small")
user = guiCreateEdit(0.0231,0.2724,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
pass_l = guiCreateLabel(0.0206,0.4216,0.9614,0.0784,"Password",true,wnd)
function Color ( )
guiLabelSetColor (pass_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(pass_l,"center",false)
guiSetFont(pass_l,"default-bold-small")
pass = guiCreateEdit(0.0231,0.5187,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(pass, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 100, 0)
guiEditSetMasked(pass,true)
remember = guiCreateCheckBox(0.0231,0.6642,0.3728,0.0746,"Remember Me !!",false,true,wnd)
guiSetFont(remember,"default-bold-small")
setTimer(function()
guiSetProperty(remember, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
reg = guiCreateButton(0.5244,0.7724,0.3239,0.153,"Register",true,wnd)
guiSetFont(reg,"default-bold-small")
setTimer(function()
guiSetProperty(reg, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
login = guiCreateButton(0.144,0.7724,0.3239,0.153,"Login",true,wnd)
guiSetFont(login,"default-bold-small")
setTimer(function()
guiSetProperty(login, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
centerWindow(wnd)
triggerServerEvent("onGetSave",localPlayer)
 
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
    function (puser,ppass)
        guiSetText(user,puser)
        guiSetText(pass,ppass)
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        if ( source == ex ) then
            guiSetVisible(wnd,false)
            showCursor(false)
            guiSetInputEnabled(false)
            Show()
        elseif ( source == english ) then
            guiSetText(user_l,"Username")
            guiSetText(pass_l,"Password")
            guiSetText(login,"Login")
            guiSetText(reg,"Register")
            guiSetText(remember,"Remember Me !!")
        elseif ( source == arabic ) then
            guiSetText(user_l,"اسم المستخدم")
            guiSetText(pass_l,"كلمه المرور")
            guiSetText(login,"تسجيل الدخول")
            guiSetText(reg,"حساب جديد")
            guiSetText(remember,"تذكرني")
        end
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        local user = guiGetText(user)
        local pass = guiGetText(pass)
        if ( source == login ) then
            if user ~= "" and pass ~= "" then
                if guiCheckBoxGetSelected(remember) then
                    triggerServerEvent("onLoginWith",localPlayer,user,pass)
                else
                    triggerServerEvent("onLogin",localPlayer,user,pass)
                end
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        elseif ( source == reg ) then
            if user ~= "" and pass ~= "" then
                triggerServerEvent("onReg",localPlayer,user,pass)
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        end
    end
)
 
addEvent("onCl",true)
addEventHandler("onCl",root,
    function ()
        guiSetVisible(wnd,false)
        showCursor(false)
        guiSetInputEnabled(false)
        Show()
    end
)
 
function setPlayerXYZ(x,y,z)
    local player = getLocalPlayer()
    setElementData(player,"x",x)
    setElementData(player,"y",y)
    setElementData(player,"z",z)
end
 
text = "~( حياكم الله في وناسة مصر )~"
dx = false
skin = {{46,"ثوب ابيض"},{0,"cj"},{181,"شخصية كوول"},{230,"شحات"}}
num = 1
place = {
    {"النخيل",2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801,2119.56250,1396.94238,10.81252},
    {"الدائري",1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996,1686.27844,1400.07080,10.74839},
    {"ساحة القتال",414.17388916016,2046.4881591797,61.682598114014,413.30380249023,2046.0771484375,61.410533905029,277.93359,1988.82581,17.64063},
    {"البداية",-2722.78125,-7649.55859375,29.089599609375,-2722.8061523438,-7650.5581054688,29.066226959229,-2730.98242,-7836.83105,8.25537},
    {"الطعس",439.50900268555,-1871.9624023438,43.744899749756,438.60696411133,-1871.5866699219,43.532466888428,305.20020,-1840.30493,3.60009}
}
--[[
1-   -2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506
2-   -2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612
     -2649.80957,376.06485,14.30767
]]--[[
    2086.59619,1472.00696,10.82031
    2040.5595703125,1424.5876464844,38.590599060059,2040.6915283203,1425.5034179688,38.211277008057
----------------------------------------------------------------------------------------------------------------
    2109.34326,1549.89893,10.82031
    2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801
    1686.27844 1400.07080 10.74839
    1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996
   
]]
function Show()
    smoothMoveCamera(-2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506,-2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612,2000)
    ped = createPed(skin[1][1],-2649.80957,376.06485,14.30767,90)
    bindKey("arrow_l","down",left)
    bindKey("arrow_r","down",right)
    bindKey("enter","down",enter)
    text = skin[1][2]
end
function left()
    if num == 1 then
        num = #skin
    else
        num = num - 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function right()
    if num == #skin then
        num = 1
    else
        num = num + 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function enter()
    playSoundFrontEnd(33)
    destroyElement(ped)
    unbindKey("arrow_l")
    unbindKey("arrow_r")
   
Link to comment
  
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function camRender ()
    if sm.object1 and isElement(sm.object1) then
        local x1, y1, z1 = getElementPosition ( sm.object1 )
        local x2, y2, z2 = getElementPosition ( sm.object2 )
        setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
    end
end
 
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end
 
function centerWindow(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
addEventHandler("onClientResourceStart",resourceRoot,
    function ()
        setTimer(function ()
            if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end
            dx = true    
            setCameraMatrix(-2684.654296875,1933.3981933594,185.04570007324,-2684.6457519531,1932.5715332031,184.48304748535)
            playSound ("ss.mp3",true)
            setTime(1,0)
            showCursor(true)
            guiSetInputEnabled(true)
            fadeCamera(true)
            showChat(false)
            setElementDimension(localPlayer,0)
            setElementData(localPlayer,"new",false)
            outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true)
        end,500,1)
    end
)
 
wnd = guiCreateStaticImage(0,-268,389,268,"abed.png",false)
english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",true,wnd)
guiSetFont(english,"default-bold-small")
setTimer(function()
guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
arabic = guiCreateButton(0.0848,0.0284,0.0566,0.1082,"Ar",true,wnd)
guiSetFont(arabic,"default-bold-small")
setTimer(function()
guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
user_l = guiCreateLabel(0.0206,0.1903,0.9614,0.0784,"Username",true,wnd)
function Color ( )
guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(user_l,"center",false)
guiSetFont(user_l,"default-bold-small")
user = guiCreateEdit(0.0231,0.2724,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
pass_l = guiCreateLabel(0.0206,0.4216,0.9614,0.0784,"Password",true,wnd)
function Color ( )
guiLabelSetColor (pass_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(pass_l,"center",false)
guiSetFont(pass_l,"default-bold-small")
pass = guiCreateEdit(0.0231,0.5187,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(pass, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 100, 0)
guiEditSetMasked(pass,true)
remember = guiCreateCheckBox(0.0231,0.6642,0.3728,0.0746,"Remember Me !!",false,true,wnd)
guiSetFont(remember,"default-bold-small")
setTimer(function()
guiSetProperty(remember, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
reg = guiCreateButton(0.5244,0.7724,0.3239,0.153,"Register",true,wnd)
guiSetFont(reg,"default-bold-small")
setTimer(function()
guiSetProperty(reg, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
login = guiCreateButton(0.144,0.7724,0.3239,0.153,"Login",true,wnd)
guiSetFont(login,"default-bold-small")
setTimer(function()
guiSetProperty(login, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
centerWindow(wnd)
triggerServerEvent("onGetSave",localPlayer)
 
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
    function (puser,ppass)
        guiSetText(user,puser)
        guiSetText(pass,ppass)
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        if ( source == ex ) then
            guiSetVisible(wnd,false)
            showCursor(false)
            guiSetInputEnabled(false)
            Show()
        elseif ( source == english ) then
            guiSetText(user_l,"Username")
            guiSetText(pass_l,"Password")
            guiSetText(login,"Login")
            guiSetText(reg,"Register")
            guiSetText(remember,"Remember Me !!")
        elseif ( source == arabic ) then
            guiSetText(user_l,"اسم المستخدم")
            guiSetText(pass_l,"كلمه المرور")
            guiSetText(login,"تسجيل الدخول")
            guiSetText(reg,"حساب جديد")
            guiSetText(remember,"تذكرني")
        end
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        local user = guiGetText(user)
        local pass = guiGetText(pass)
        if ( source == login ) then
            if user ~= "" and pass ~= "" then
                if guiCheckBoxGetSelected(remember) then
                    triggerServerEvent("onLoginWith",localPlayer,user,pass)
                else
                    triggerServerEvent("onLogin",localPlayer,user,pass)
                end
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        elseif ( source == reg ) then
            if user ~= "" and pass ~= "" then
                triggerServerEvent("onReg",localPlayer,user,pass)
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        end
    end
)
 
addEvent("onCl",true)
addEventHandler("onCl",root,
    function ()
        guiSetVisible(wnd,false)
        showCursor(false)
        guiSetInputEnabled(false)
        Show()
    end
)
 
function setPlayerXYZ(x,y,z)
    local player = getLocalPlayer()
    setElementData(player,"x",x)
    setElementData(player,"y",y)
    setElementData(player,"z",z)
end
 
text = "~( حياكم الله في وناسة مصر )~"
dx = false
skin = {{46,"ثوب ابيض"},{0,"cj"},{181,"شخصية كوول"},{230,"شحات"}}
num = 1
place = {
    {"النخيل",2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801,2119.56250,1396.94238,10.81252},
    {"الدائري",1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996,1686.27844,1400.07080,10.74839},
    {"ساحة القتال",414.17388916016,2046.4881591797,61.682598114014,413.30380249023,2046.0771484375,61.410533905029,277.93359,1988.82581,17.64063},
    {"البداية",-2722.78125,-7649.55859375,29.089599609375,-2722.8061523438,-7650.5581054688,29.066226959229,-2730.98242,-7836.83105,8.25537},
    {"الطعس",439.50900268555,-1871.9624023438,43.744899749756,438.60696411133,-1871.5866699219,43.532466888428,305.20020,-1840.30493,3.60009}
}
--[[
1-   -2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506
2-   -2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612
     -2649.80957,376.06485,14.30767
]]--[[
    2086.59619,1472.00696,10.82031
    2040.5595703125,1424.5876464844,38.590599060059,2040.6915283203,1425.5034179688,38.211277008057
----------------------------------------------------------------------------------------------------------------
    2109.34326,1549.89893,10.82031
    2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801
    1686.27844 1400.07080 10.74839
    1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996
   
]]
function Show()
    smoothMoveCamera(-2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506,-2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612,2000)
    ped = createPed(skin[1][1],-2649.80957,376.06485,14.30767,90)
    bindKey("arrow_l","down",left)
    bindKey("arrow_r","down",right)
    bindKey("enter","down",enter)
    text = skin[1][2]
end
function left()
    if num == 1 then
        num = #skin
    else
        num = num - 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function right()
    if num == #skin then
        num = 1
    else
        num = num + 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function enter()
    playSoundFrontEnd(33)
    destroyElement(ped)
   
Link to comment

  
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function camRender ()
    if sm.object1 and isElement(sm.object1) then
        local x1, y1, z1 = getElementPosition ( sm.object1 )
        local x2, y2, z2 = getElementPosition ( sm.object2 )
        setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
    end
end
 
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end
 
function centerWindow(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
addEventHandler("onClientResourceStart",resourceRoot,
    function ()
        setTimer(function ()
            if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end
            dx = true    
            setCameraMatrix(-2684.654296875,1933.3981933594,185.04570007324,-2684.6457519531,1932.5715332031,184.48304748535)
            sound = playSound ("ss.mp3",true)
            setTime(1,0)
            showCursor(true)
            guiSetInputEnabled(true)
            fadeCamera(true)
            showChat(false)
            setElementDimension(localPlayer,0)
            setElementData(localPlayer,"new",false)
            outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true)
        end,500,1)
    end
)
 
wnd = guiCreateStaticImage(0,-268,389,268,"abed.png",false)
english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",true,wnd)
guiSetFont(english,"default-bold-small")
setTimer(function()
guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
arabic = guiCreateButton(0.0848,0.0284,0.0566,0.1082,"Ar",true,wnd)
guiSetFont(arabic,"default-bold-small")
setTimer(function()
guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
user_l = guiCreateLabel(0.0206,0.1903,0.9614,0.0784,"Username",true,wnd)
function Color ( )
guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(user_l,"center",false)
guiSetFont(user_l,"default-bold-small")
user = guiCreateEdit(0.0231,0.2724,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
pass_l = guiCreateLabel(0.0206,0.4216,0.9614,0.0784,"Password",true,wnd)
function Color ( )
guiLabelSetColor (pass_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(pass_l,"center",false)
guiSetFont(pass_l,"default-bold-small")
pass = guiCreateEdit(0.0231,0.5187,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(pass, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 100, 0)
guiEditSetMasked(pass,true)
remember = guiCreateCheckBox(0.0231,0.6642,0.3728,0.0746,"Remember Me !!",false,true,wnd)
guiSetFont(remember,"default-bold-small")
setTimer(function()
guiSetProperty(remember, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
reg = guiCreateButton(0.5244,0.7724,0.3239,0.153,"Register",true,wnd)
guiSetFont(reg,"default-bold-small")
setTimer(function()
guiSetProperty(reg, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
login = guiCreateButton(0.144,0.7724,0.3239,0.153,"Login",true,wnd)
guiSetFont(login,"default-bold-small")
setTimer(function()
guiSetProperty(login, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
centerWindow(wnd)
triggerServerEvent("onGetSave",localPlayer)
 
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
    function (puser,ppass)
        guiSetText(user,puser)
        guiSetText(pass,ppass)
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        if ( source == ex ) then
            guiSetVisible(wnd,false)
            showCursor(false)
            guiSetInputEnabled(false)
            Show()
        elseif ( source == english ) then
            guiSetText(user_l,"Username")
            guiSetText(pass_l,"Password")
            guiSetText(login,"Login")
            guiSetText(reg,"Register")
            guiSetText(remember,"Remember Me !!")
        elseif ( source == arabic ) then
            guiSetText(user_l,"اسم المستخدم")
            guiSetText(pass_l,"كلمه المرور")
            guiSetText(login,"تسجيل الدخول")
            guiSetText(reg,"حساب جديد")
            guiSetText(remember,"تذكرني")
        end
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        local user = guiGetText(user)
        local pass = guiGetText(pass)
        if ( source == login ) then
            if user ~= "" and pass ~= "" then
                if guiCheckBoxGetSelected(remember) then
                    triggerServerEvent("onLoginWith",localPlayer,user,pass)
                else
                    triggerServerEvent("onLogin",localPlayer,user,pass)
                end
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        elseif ( source == reg ) then
            if user ~= "" and pass ~= "" then
                triggerServerEvent("onReg",localPlayer,user,pass)
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        end
    end
)
 
addEvent("onCl",true)
addEventHandler("onCl",root,
    function ()
        guiSetVisible(wnd,false)
        showCursor(false)
        guiSetInputEnabled(false)
        Show()
        if isElement ( sound ) then
        destroyElement ( sound )
          end
    end
)
 
function setPlayerXYZ(x,y,z)
    local player = getLocalPlayer()
    setElementData(player,"x",x)
    setElementData(player,"y",y)
    setElementData(player,"z",z)
end
 
text = "~( حياكم الله في وناسة مصر )~"
dx = false
skin = {{46,"ثوب ابيض"},{0,"cj"},{181,"شخصية كوول"},{230,"شحات"}}
num = 1
place = {
    {"النخيل",2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801,2119.56250,1396.94238,10.81252},
    {"الدائري",1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996,1686.27844,1400.07080,10.74839},
    {"ساحة القتال",414.17388916016,2046.4881591797,61.682598114014,413.30380249023,2046.0771484375,61.410533905029,277.93359,1988.82581,17.64063},
    {"البداية",-2722.78125,-7649.55859375,29.089599609375,-2722.8061523438,-7650.5581054688,29.066226959229,-2730.98242,-7836.83105,8.25537},
    {"الطعس",439.50900268555,-1871.9624023438,43.744899749756,438.60696411133,-1871.5866699219,43.532466888428,305.20020,-1840.30493,3.60009}
}
--[[
1-   -2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506
2-   -2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612
     -2649.80957,376.06485,14.30767
]]--[[
    2086.59619,1472.00696,10.82031
    2040.5595703125,1424.5876464844,38.590599060059,2040.6915283203,1425.5034179688,38.211277008057
----------------------------------------------------------------------------------------------------------------
    2109.34326,1549.89893,10.82031
    2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801
    1686.27844 1400.07080 10.74839
    1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996
   
]]
function Show()
    smoothMoveCamera(-2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506,-2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612,2000)
    ped = createPed(skin[1][1],-2649.80957,376.06485,14.30767,90)
    bindKey("arrow_l","down",left)
    bindKey("arrow_r","down",right)
    bindKey("enter","down",enter)
    text = skin[1][2]
end
function left()
    if num == 1 then
        num = #skin
    else
        num = num - 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function right()
    if num == #skin then
        num = 1
    else
        num = num + 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function enter()
    playSoundFrontEnd(33)
   
Link to comment
  
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function camRender ()
    if sm.object1 and isElement(sm.object1) then
        local x1, y1, z1 = getElementPosition ( sm.object1 )
        local x2, y2, z2 = getElementPosition ( sm.object2 )
        setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
    end
end
 
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end
 
function centerWindow(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
addEventHandler("onClientResourceStart",resourceRoot,
    function ()
        setTimer(function ()
            if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end
            dx = true    
            setCameraMatrix(-2684.654296875,1933.3981933594,185.04570007324,-2684.6457519531,1932.5715332031,184.48304748535)
            sound = playSound ("ss.mp3",true)
            setTime(1,0)
            showCursor(true)
            guiSetInputEnabled(true)
            fadeCamera(true)
            showChat(false)
            setElementDimension(localPlayer,0)
            setElementData(localPlayer,"new",false)
            outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true)
        end,500,1)
    end
)
 
wnd = guiCreateStaticImage(0,-268,389,268,"abed.png",false)
english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",true,wnd)
guiSetFont(english,"default-bold-small")
setTimer(function()
guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
arabic = guiCreateButton(0.0848,0.0284,0.0566,0.1082,"Ar",true,wnd)
guiSetFont(arabic,"default-bold-small")
setTimer(function()
guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
user_l = guiCreateLabel(0.0206,0.1903,0.9614,0.0784,"Username",true,wnd)
function Color ( )
guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(user_l,"center",false)
guiSetFont(user_l,"default-bold-small")
user = guiCreateEdit(0.0231,0.2724,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
pass_l = guiCreateLabel(0.0206,0.4216,0.9614,0.0784,"Password",true,wnd)
function Color ( )
guiLabelSetColor (pass_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(pass_l,"center",false)
guiSetFont(pass_l,"default-bold-small")
pass = guiCreateEdit(0.0231,0.5187,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(pass, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 100, 0)
guiEditSetMasked(pass,true)
remember = guiCreateCheckBox(0.0231,0.6642,0.3728,0.0746,"Remember Me !!",false,true,wnd)
guiSetFont(remember,"default-bold-small")
setTimer(function()
guiSetProperty(remember, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
reg = guiCreateButton(0.5244,0.7724,0.3239,0.153,"Register",true,wnd)
guiSetFont(reg,"default-bold-small")
setTimer(function()
guiSetProperty(reg, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
login = guiCreateButton(0.144,0.7724,0.3239,0.153,"Login",true,wnd)
guiSetFont(login,"default-bold-small")
setTimer(function()
guiSetProperty(login, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
centerWindow(wnd)
triggerServerEvent("onGetSave",localPlayer)
 
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
    function (puser,ppass)
        guiSetText(user,puser)
        guiSetText(pass,ppass)
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        if ( source == ex ) then
            guiSetVisible(wnd,false)
            showCursor(false)
            guiSetInputEnabled(false)
            Show()
        elseif ( source == english ) then
            guiSetText(user_l,"Username")
            guiSetText(pass_l,"Password")
            guiSetText(login,"Login")
            guiSetText(reg,"Register")
            guiSetText(remember,"Remember Me !!")
        elseif ( source == arabic ) then
            guiSetText(user_l,"اسم المستخدم")
            guiSetText(pass_l,"كلمه المرور")
            guiSetText(login,"تسجيل الدخول")
            guiSetText(reg,"حساب جديد")
            guiSetText(remember,"تذكرني")
        end
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        local user = guiGetText(user)
        local pass = guiGetText(pass)
        if ( source == login ) then
            if user ~= "" and pass ~= "" then
                if guiCheckBoxGetSelected(remember) then
                    triggerServerEvent("onLoginWith",localPlayer,user,pass)
                else
                    triggerServerEvent("onLogin",localPlayer,user,pass)
                end
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        elseif ( source == reg ) then
            if user ~= "" and pass ~= "" then
                triggerServerEvent("onReg",localPlayer,user,pass)
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        end
    end
)
 
addEvent("onCl",true)
addEventHandler("onCl",root,
    function ()
        guiSetVisible(wnd,false)
        showCursor(false)
        guiSetInputEnabled(false)
        Show()
        if isElement ( sound ) then
        destroyElement ( sound )
          end
    end
)
 
function setPlayerXYZ(x,y,z)
    local player = getLocalPlayer()
    setElementData(player,"x",x)
    setElementData(player,"y",y)
    setElementData(player,"z",z)
end
 
text = "~( حياكم الله في وناسة مصر )~"
dx = false
skin = {{46,"ثوب ابيض"},{0,"cj"},{181,"شخصية كوول"},{230,"شحات"}}
num = 1
place = {
    {"النخيل",2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801,2119.56250,1396.94238,10.81252},
    {"الدائري",1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996,1686.27844,1400.07080,10.74839},
    {"ساحة القتال",414.17388916016,2046.4881591797,61.682598114014,413.30380249023,2046.0771484375,61.410533905029,277.93359,1988.82581,17.64063},
    {"البداية",-2722.78125,-7649.55859375,29.089599609375,-2722.8061523438,-7650.5581054688,29.066226959229,-2730.98242,-7836.83105,8.25537},
    {"الطعس",439.50900268555,-1871.9624023438,43.744899749756,438.60696411133,-1871.5866699219,43.532466888428,305.20020,-1840.30493,3.60009}
}
--[[
1-   -2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506
2-   -2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612
     -2649.80957,376.06485,14.30767
]]--[[
    2086.59619,1472.00696,10.82031
    2040.5595703125,1424.5876464844,38.590599060059,2040.6915283203,1425.5034179688,38.211277008057
----------------------------------------------------------------------------------------------------------------
    2109.34326,1549.89893,10.82031
    2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801
    1686.27844 1400.07080 10.74839
    1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996
   
]]
function Show()
    smoothMoveCamera(-2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506,-2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612,2000)
    ped = createPed(skin[1][1],-2649.80957,376.06485,14.30767,90)
    bindKey("arrow_l","down",left)
    bindKey("arrow_r","down",right)
    bindKey("enter","down",enter)
    text = skin[1][2]
end
function left()
    if num == 1 then
        num = #skin
    else
        num = num - 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function right()
    if num == #skin then
        num = 1
    else
        num = num + 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function enter()
   
Edited by Guest
Link to comment

  
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function camRender ()
    if sm.object1 and isElement(sm.object1) then
        local x1, y1, z1 = getElementPosition ( sm.object1 )
        local x2, y2, z2 = getElementPosition ( sm.object2 )
        setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
    end
end
 
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end
 
function centerWindow(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
addEventHandler("onClientResourceStart",resourceRoot,
    function ()
        setTimer(function ()
            if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end
            dx = true    
            setCameraMatrix(-2684.654296875,1933.3981933594,185.04570007324,-2684.6457519531,1932.5715332031,184.48304748535)
            sound = playSound ("ss.mp3",true)
            setTime(1,0)
            showCursor(true)
            guiSetInputEnabled(true)
            fadeCamera(true)
            showChat(false)
            setElementDimension(localPlayer,0)
            setElementData(localPlayer,"new",false)
            outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true)
        end,500,1)
    end
)
 
wnd = guiCreateStaticImage(0,-268,389,268,"abed.png",false)
english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",true,wnd)
guiSetFont(english,"default-bold-small")
setTimer(function()
guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
arabic = guiCreateButton(0.0848,0.0284,0.0566,0.1082,"Ar",true,wnd)
guiSetFont(arabic,"default-bold-small")
setTimer(function()
guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
user_l = guiCreateLabel(0.0206,0.1903,0.9614,0.0784,"Username",true,wnd)
function Color ( )
guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(user_l,"center",false)
guiSetFont(user_l,"default-bold-small")
user = guiCreateEdit(0.0231,0.2724,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
pass_l = guiCreateLabel(0.0206,0.4216,0.9614,0.0784,"Password",true,wnd)
function Color ( )
guiLabelSetColor (pass_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(pass_l,"center",false)
guiSetFont(pass_l,"default-bold-small")
pass = guiCreateEdit(0.0231,0.5187,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(pass, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 100, 0)
guiEditSetMasked(pass,true)
remember = guiCreateCheckBox(0.0231,0.6642,0.3728,0.0746,"Remember Me !!",false,true,wnd)
guiSetFont(remember,"default-bold-small")
setTimer(function()
guiSetProperty(remember, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
reg = guiCreateButton(0.5244,0.7724,0.3239,0.153,"Register",true,wnd)
guiSetFont(reg,"default-bold-small")
setTimer(function()
guiSetProperty(reg, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
login = guiCreateButton(0.144,0.7724,0.3239,0.153,"Login",true,wnd)
guiSetFont(login,"default-bold-small")
setTimer(function()
guiSetProperty(login, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
centerWindow(wnd)
triggerServerEvent("onGetSave",localPlayer)
 
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
    function (puser,ppass)
        guiSetText(user,puser)
        guiSetText(pass,ppass)
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        if ( source == ex ) then
            guiSetVisible(wnd,false)
            showCursor(false)
            guiSetInputEnabled(false)
            Show()
        elseif ( source == english ) then
            guiSetText(user_l,"Username")
            guiSetText(pass_l,"Password")
            guiSetText(login,"Login")
            guiSetText(reg,"Register")
            guiSetText(remember,"Remember Me !!")
        elseif ( source == arabic ) then
            guiSetText(user_l,"اسم المستخدم")
            guiSetText(pass_l,"كلمه المرور")
            guiSetText(login,"تسجيل الدخول")
            guiSetText(reg,"حساب جديد")
            guiSetText(remember,"تذكرني")
        end
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        local user = guiGetText(user)
        local pass = guiGetText(pass)
        if ( source == login ) then
            if user ~= "" and pass ~= "" then
                if guiCheckBoxGetSelected(remember) then
                    triggerServerEvent("onLoginWith",localPlayer,user,pass)
                else
                    triggerServerEvent("onLogin",localPlayer,user,pass)
                end
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        elseif ( source == reg ) then
            if user ~= "" and pass ~= "" then
                triggerServerEvent("onReg",localPlayer,user,pass)
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        end
    end
)
 
addEvent("onCl",true)
addEventHandler("onCl",root,
    function ()
        guiSetVisible(wnd,false)
        showCursor(false)
        guiSetInputEnabled(false)
        Show()
    end
)
 
function setPlayerXYZ(x,y,z)
    local player = getLocalPlayer()
    setElementData(player,"x",x)
    setElementData(player,"y",y)
    setElementData(player,"z",z)
end
 
text = "~( حياكم الله في وناسة مصر )~"
dx = false
skin = {{46,"ثوب ابيض"},{0,"cj"},{181,"شخصية كوول"},{230,"شحات"}}
num = 1
place = {
    {"النخيل",2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801,2119.56250,1396.94238,10.81252},
    {"الدائري",1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996,1686.27844,1400.07080,10.74839},
    {"ساحة القتال",414.17388916016,2046.4881591797,61.682598114014,413.30380249023,2046.0771484375,61.410533905029,277.93359,1988.82581,17.64063},
    {"البداية",-2722.78125,-7649.55859375,29.089599609375,-2722.8061523438,-7650.5581054688,29.066226959229,-2730.98242,-7836.83105,8.25537},
    {"الطعس",439.50900268555,-1871.9624023438,43.744899749756,438.60696411133,-1871.5866699219,43.532466888428,305.20020,-1840.30493,3.60009}
}
--[[
1-   -2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506
2-   -2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612
     -2649.80957,376.06485,14.30767
]]--[[
    2086.59619,1472.00696,10.82031
    2040.5595703125,1424.5876464844,38.590599060059,2040.6915283203,1425.5034179688,38.211277008057
----------------------------------------------------------------------------------------------------------------
    2109.34326,1549.89893,10.82031
    2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801
    1686.27844 1400.07080 10.74839
    1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996
   
]]
function Show()
    smoothMoveCamera(-2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506,-2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612,2000)
    ped = createPed(skin[1][1],-2649.80957,376.06485,14.30767,90)
    bindKey("arrow_l","down",left)
    bindKey("arrow_r","down",right)
    bindKey("enter","down",enter)
    text = skin[1][2]
end
function left()
    if num == 1 then
        num = #skin
    else
        num = num - 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function right()
    if num == #skin then
        num = 1
    else
        num = num + 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function enter()
    playSoundFrontEnd(33)
    destroyElement(ped)
    unbindKey("arrow_l")
    unbindKey("arrow_r")
   
Link to comment
  
 
local sm = {}
sm.moov = 0
sm.object1, sm.object2 = nil, nil
 
local function removeCamHandler ()
    if(sm.moov == 1) then
        sm.moov = 0
        removeEventHandler ( "onClientPreRender", getRootElement(), camRender )
    end
end
 
function camRender ()
    if sm.object1 and isElement(sm.object1) then
        local x1, y1, z1 = getElementPosition ( sm.object1 )
        local x2, y2, z2 = getElementPosition ( sm.object2 )
        setCameraMatrix ( x1, y1, z1, x2, y2, z2 )
    end
end
 
function smoothMoveCamera ( x1, y1, z1, x1t, y1t, z1t, x2, y2, z2, x2t, y2t, z2t, time )
    if(sm.moov == 1) then return false end
    sm.object1 = createObject ( 1337, x1, y1, z1 )
    sm.object2 = createObject ( 1337, x1t, y1t, z1t )
    setElementAlpha ( sm.object1, 0 )
    setElementAlpha ( sm.object2, 0 )
    setObjectScale(sm.object1, 0.01)
    setObjectScale(sm.object2, 0.01)
    moveObject ( sm.object1, time, x2, y2, z2, 0, 0, 0, "InOutQuad" )
    moveObject ( sm.object2, time, x2t, y2t, z2t, 0, 0, 0, "InOutQuad" )
 
    addEventHandler ( "onClientPreRender", getRootElement(), camRender )
    sm.moov = 1
    setTimer ( removeCamHandler, time, 1 )
    setTimer ( destroyElement, time, 1, sm.object1 )
    setTimer ( destroyElement, time, 1, sm.object2 )
    return true
end
 
function centerWindow(center_window)
    local screenW,screenH=guiGetScreenSize()
    local windowW,windowH=guiGetSize(center_window,false)
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2
    guiSetPosition(center_window,x,y,false)
end
 
addEventHandler("onClientResourceStart",resourceRoot,
    function ()
        setTimer(function ()
            if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end
            dx = true    
            setCameraMatrix(-2684.654296875,1933.3981933594,185.04570007324,-2684.6457519531,1932.5715332031,184.48304748535)
            sound = playSound ("ss.mp3",true)
            setTime(1,0)
            showCursor(true)
            guiSetInputEnabled(true)
            fadeCamera(true)
            showChat(false)
            setElementDimension(localPlayer,0)
            setElementData(localPlayer,"new",false)
            outputChatBox("#0069c7 ## #ff0000 GameMode By #0069c7[#ff0000MR~#0069c7Mos.[T].aّّّfA~#ff0000] #0069c7##",255,0,0,true)
        end,500,1)
    end
)
 
wnd = guiCreateStaticImage(0,-268,389,268,"abed.png",false)
english = guiCreateButton(0.0231,0.0284,0.0566,0.1082,"En",true,wnd)
guiSetFont(english,"default-bold-small")
setTimer(function()
guiSetProperty(english, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
arabic = guiCreateButton(0.0848,0.0284,0.0566,0.1082,"Ar",true,wnd)
guiSetFont(arabic,"default-bold-small")
setTimer(function()
guiSetProperty(arabic, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
user_l = guiCreateLabel(0.0206,0.1903,0.9614,0.0784,"Username",true,wnd)
function Color ( )
guiLabelSetColor (user_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(user_l,"center",false)
guiSetFont(user_l,"default-bold-small")
user = guiCreateEdit(0.0231,0.2724,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(user, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
pass_l = guiCreateLabel(0.0206,0.4216,0.9614,0.0784,"Password",true,wnd)
function Color ( )
guiLabelSetColor (pass_l, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
end
setTimer ( Color, 1000, 0 )
guiLabelSetHorizontalAlign(pass_l,"center",false)
guiSetFont(pass_l,"default-bold-small")
pass = guiCreateEdit(0.0231,0.5187,0.9537,0.1306,"",true,wnd)
setTimer(function()
guiSetProperty(pass, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 100, 0)
guiEditSetMasked(pass,true)
remember = guiCreateCheckBox(0.0231,0.6642,0.3728,0.0746,"Remember Me !!",false,true,wnd)
guiSetFont(remember,"default-bold-small")
setTimer(function()
guiSetProperty(remember, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
reg = guiCreateButton(0.5244,0.7724,0.3239,0.153,"Register",true,wnd)
guiSetFont(reg,"default-bold-small")
setTimer(function()
guiSetProperty(reg, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
login = guiCreateButton(0.144,0.7724,0.3239,0.153,"Login",true,wnd)
guiSetFont(login,"default-bold-small")
setTimer(function()
guiSetProperty(login, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
    end, 1000, 0)
centerWindow(wnd)
triggerServerEvent("onGetSave",localPlayer)
 
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
    function (puser,ppass)
        guiSetText(user,puser)
        guiSetText(pass,ppass)
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        if ( source == ex ) then
            guiSetVisible(wnd,false)
            showCursor(false)
            guiSetInputEnabled(false)
            Show()
        elseif ( source == english ) then
            guiSetText(user_l,"Username")
            guiSetText(pass_l,"Password")
            guiSetText(login,"Login")
            guiSetText(reg,"Register")
            guiSetText(remember,"Remember Me !!")
        elseif ( source == arabic ) then
            guiSetText(user_l,"اسم المستخدم")
            guiSetText(pass_l,"كلمه المرور")
            guiSetText(login,"تسجيل الدخول")
            guiSetText(reg,"حساب جديد")
            guiSetText(remember,"تذكرني")
        end
    end
)
 
addEventHandler("onClientGUIClick",root,
    function ()
        local user = guiGetText(user)
        local pass = guiGetText(pass)
        if ( source == login ) then
            if user ~= "" and pass ~= "" then
                if guiCheckBoxGetSelected(remember) then
                    triggerServerEvent("onLoginWith",localPlayer,user,pass)
                else
                    triggerServerEvent("onLogin",localPlayer,user,pass)
                end
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        elseif ( source == reg ) then
            if user ~= "" and pass ~= "" then
                triggerServerEvent("onReg",localPlayer,user,pass)
            else
                outputChatBox("* You Must Write Username Or Password",255,0,0)
            end
        end
    end
)
 
addEvent("onCl",true)
addEventHandler("onCl",root,
    function ()
        guiSetVisible(wnd,false)
        showCursor(false)
        guiSetInputEnabled(false)
        Show()
    end
)
 
function setPlayerXYZ(x,y,z)
    local player = getLocalPlayer()
    setElementData(player,"x",x)
    setElementData(player,"y",y)
    setElementData(player,"z",z)
end
 
text = "~( حياكم الله في وناسة مصر )~"
dx = false
skin = {{46,"ثوب ابيض"},{0,"cj"},{181,"شخصية كوول"},{230,"شحات"}}
num = 1
place = {
    {"النخيل",2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801,2119.56250,1396.94238,10.81252},
    {"الدائري",1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996,1686.27844,1400.07080,10.74839},
    {"ساحة القتال",414.17388916016,2046.4881591797,61.682598114014,413.30380249023,2046.0771484375,61.410533905029,277.93359,1988.82581,17.64063},
    {"البداية",-2722.78125,-7649.55859375,29.089599609375,-2722.8061523438,-7650.5581054688,29.066226959229,-2730.98242,-7836.83105,8.25537},
    {"الطعس",439.50900268555,-1871.9624023438,43.744899749756,438.60696411133,-1871.5866699219,43.532466888428,305.20020,-1840.30493,3.60009}
}
--[[
1-   -2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506
2-   -2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612
     -2649.80957,376.06485,14.30767
]]--[[
    2086.59619,1472.00696,10.82031
    2040.5595703125,1424.5876464844,38.590599060059,2040.6915283203,1425.5034179688,38.211277008057
----------------------------------------------------------------------------------------------------------------
    2109.34326,1549.89893,10.82031
    2021.6854248047,1441.3870849609,40.58459854126,2022.5858154297,1441.0551757813,40.303291320801
    1686.27844 1400.07080 10.74839
    1869.2296142578,1426.2882080078,74.245399475098,1868.2775878906,1426.3618164063,73.948387145996
   
]]
function Show()
    smoothMoveCamera(-2693.33984375,377.26239013672,44.666900634766,-2692.5363769531,377.23040771484,44.072536468506,-2653.2521972656,375.9367980957,15.524200439453,-2652.2685546875,375.97338867188,15.348023414612,2000)
    ped = createPed(skin[1][1],-2649.80957,376.06485,14.30767,90)
    bindKey("arrow_l","down",left)
    bindKey("arrow_r","down",right)
    bindKey("enter","down",enter)
    text = skin[1][2]
end
function left()
    if num == 1 then
        num = #skin
    else
        num = num - 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function right()
    if num == #skin then
        num = 1
    else
        num = num + 1
    end
    setElementModel(ped,skin[num][1])
    text = skin[num][2]
    playSoundFrontEnd(32)
end
 
function enter()
    playSoundFrontEnd(33)
    destroyElement(ped)
   
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...