سلام عليكم ورحمة الله وبركاته
هاد قيم مودهجولة
المشكله الي فيه اني ابي اغيره من بعد تسجيل يجي لك اختيار المكان وشخصية
ابي اغير من انه علشان تغير المكان وشخصيه من الاسهم
الي لوحة تفتح لك بشكل حلو وتقول اختار المكان وتحت فيه اختيار شخصيه
بس اس ابي يكون فيه شيء يقول لك اظهار صورة المكان الي تبيه
انا حاول من امس صبح وانا احاول كل ماعدل يغرب ومايشتغل
ارجوكم لا تبغلو علي لو سمحتم
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,""},{104,""},{124,""}}
num = 1
place = {
{"البداية الرئيسية",-4496.9311523438,-2629.4548339844,46.657073974609,-6038.07178, -1211.89038, 4.27837, -4761.966796875, -2609.5629882813, 5.5015625953674},
{"الدايري",1873.07971, 825.39416, 29.59185,1797.5855712891,830.97955322266,10.664346694946,1848.1938476563,807.23809814453,10.6810131073},
{"الطعس",-2541.21655, -2897.66601, 18.39924,-2479.4760742188,-2830.7487792969,3,-2479.4760742188,-2830.7487792969,3},
{"الشارع الطويل",-3070.94921, -3083.84301, 45.22809,-3072.5554199219,-3000.345703125,5,-3072.5554199219,-3000.345703125,5},
}
function Show()
smoothMoveCamera(2070.6166992188 ,1007.6680908203 ,60.8203125 ,2060.6166992188 ,1007.6680908203 ,60.8203125 ,2025.6166992188 ,1007.6680908203 ,10.8203125,2021.6166992188 ,1007.6680908203 ,10.8203125,6000)
ped = createPed(skin[1][1],2021.6166992188 ,1007.6680908203 ,10.1 ,370)
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
addEventHandler('onClientRender',root,re)
function r_s()
if ( getElementModel(ped) == 1 ) then
setElementModel(ped,2)
model = 2
else
model = getElementModel(ped) + 1
setElementModel(ped,model)
end
end
function l_s()
if ( getElementModel(ped) == 2 ) then
setElementModel(ped,1)
model = 1
else
model = getElementModel(ped) - 1
setElementModel(ped,model)
end
end
function enter()
triggerEvent("addNotification", getLocalPlayer(),"",1)
playSoundFrontEnd(33)
destroyElement(ped)
unbindKey("arrow_l")
unbindKey("arrow_r")
unbindKey("enter")
setTimer(fadeCamera, 1000, 1, true)
setElementData(localPlayer,"skin",skin[num][1])
num = 1
text = place[num][1]
setCameraMatrix(place[num][2],place[num][3],place[num][4],place[num][5],place[num][6],place[num][7])
dx = true
bindKey("arrow_l","down",Pleft)
bindKey("arrow_r","down",Pright)
bindKey("enter","down",Penter)
end
addEventHandler("onClientRender",root,
function ()
local size = {guiGetScreenSize()}
if dx == true then
dxDrawText("\n( " .. text .. " )",1,0,size[1] + 1,size[2],tocolor(0,0,0,255),3,"default-bold","center","top",false,false,false,true)
dxDrawText("\n( " .. text .. " )",0,0,size[1],size[2],tocolor(255,166,0,255),3,"default-bold","center","top",false,false,false,true)
end
end
)
function Pleft()
if num == 1 then
num = #place
else
num = num - 1
end
text = place[num][1]
setCameraMatrix(place[num][2],place[num][3],place[num][4],place[num][5],place[num][6],place[num][7])
playSoundFrontEnd(32)
end
function Pright()
if num == #place then
num = 1
else
num = num + 1
end
text = place[num][1]
setCameraMatrix(place[num][2],place[num][3],place[num][4],place[num][5],place[num][6],place[num][7])
playSoundFrontEnd(32)
end
function Penter()
playSoundFrontEnd(33)
unbindKey("arrow_l")
unbindKey("arrow_r")
unbindKey("enter")
triggerEvent("addNotification", getLocalPlayer(),"",1)
triggerEvent("addNotification", getLocalPlayer(),"",3)
showPlayerHudComponent('radar',true)
showChat(true)
dx = false
text = ""
setPlayerXYZ(place[num][8],place[num][9],place[num][10])
triggerServerEvent("SpawnPlayer",localPlayer)
end
fileDelete("Client.lua")
وابي تقسمون المكان من كامير لان فيه اختبر المكان موجود احتثيات المكان والكميراء
انا اختيار شخصيه تكون موجود في اي مكان تختار فوق