Jump to content

تصحيح اكود


Ahmed Ly

Recommended Posts

وين خطا في هدا اكود؟

كلنت

  
GUIEditor = { 
    label = {}, 
} 
GUIEditor.label[1] = guiCreateStaticImage(467, 447, 189, 75, "r.png", false) 
  
  
GUIEditor.label[2] = guiCreateStaticImage(218, 447, 189, 75, "q.png", false) 
  
  
GUIEditor.label[3] = guiCreateStaticImage(327, 532, 221, 93, "s.png", false) 
  
  
GUIEditor.label[4] = guiCreateStaticImage(279, 379, 159, 51, "CL.png", false) 
  
guiSetVisible(GUIEditor.label[1],false) 
  
guiSetVisible(GUIEditor.label[2],false) 
  
guiSetVisible(GUIEditor.label[3],false) 
  
guiSetVisible(GUIEditor.label[4],false) 
  
  
  
  
mrss = createMarker (377.54077,-1887.06738,7.83594,"cylinder",1,52,38,162,255) 
  
function hit () 
  
  
triggerServerEvent("hitt",localplayer) 
  
playSound("lol.mp3") 
  
guiSetVisible(GUIEditor.label[1],true) 
  
guiSetVisible(GUIEditor.label[2],true) 
  
guiSetVisible(GUIEditor.label[3],true) 
  
guiSetVisible(GUIEditor.label[4],true) 
  
showCursor(true) 
  
end 
addEventHandler("onClientMarkerHit",mrss,hit) 
  
  
  
  
  
function off () 
  
if source == GUIEditor.label[4] then  
  
playSoundFrontEnd(10) 
  
guiSetVisible(GUIEditor.label[1],false) 
  
guiSetVisible(GUIEditor.label[2],false) 
  
guiSetVisible(GUIEditor.label[3],false) 
  
guiSetVisible(GUIEditor.label[4],false) 
  
showCursor(false) 
  
triggerServerEvent("stop",localplayer) 
  
end 
  
end 
  
addEventHandler("onClientGUIClick",root,off) 
  
  
  
function oo () 
  
if source == GUIEditor.label[2] then  
  
triggerServerEvent("mony",localplayer) 
  
playSoundFrontEnd(10) 
  
end 
  
end 
addEventHandler("onClientGUIClick",root,oo) 
  
  
  
  
function skibb () 
  
if source == GUIEditor.label[1] then  
  
playSoundFrontEnd(10) 
  
triggerServerEvent("sss",localplayer) 
  
end 
  
end 
  
addEventHandler("onClientGUIClick",root,skibb) 

سيرفر

function skinnn () 
  
  
    takePlayerMoney(source, 500) 
  
    id = math.random(46) 
  
setElementModel(source,id) 
  
outputChatBox("تم شراء بنجاح",source,0,255,0) 
  
end 
  
  
addEvent("mony",true) 
addEventHandler("mony",root,skinnn) 
  
  
  
  
  
function rrr () 
  
  
    takePlayerMoney(source, 500) 
  
    id = math.random(46) 
  
setElementModel(source,id) 
  
outputChatBox("تم شراء بنجاح",source,0,255,0) 
  
  
  
end 
  
addEvent("sss",true) 
addEventHandler("sss",root,rrr) 
  
  
  
function mm () 
  
  
setElementPosition(source,395.46591,-1858.81592,13.60156) 
  
setCameraMatrix(source,395.64987,-1868.80786,13.60156,395.46591,-1858.81592,13.60156) 
  
end 
addEvent("hitt",true) 
addEventHandler("hitt",root,mm) 
  
  
function stopp () 
  
  
setCameraTarget(source,source) 
  
end 
addEvent("stop",true) 
addEventHandler("stop",root,stopp) 

:oops::oops:

Link to comment
function skinnn () 
 if getPlayerMoney (source) >= 500 then 
    takePlayerMoney(source, 500)  
setElementModel(source,46) 
outputChatBox("تم شراء بنجاح",source,0,255,0) 
else 
outputChatBox ("ليس لديك مالاً كافي",source,255,0,0) 
end 
end 
addEvent("mony",true) 
addEventHandler("mony",root,skinnn) 
  
function rrr () 
 if getPlayerMoney (source) >= 500 then 
    takePlayerMoney(source, 500) 
setElementModel(source,46) 
outputChatBox("تم شراء بنجاح",source,0,255,0) 
else 
outputChatBox ("ليس لديك مالاً كافي",source,255,0,0) 
 end 
end 
addEvent("sss",true) 
addEventHandler("sss",root,rrr) 
  
  
  
function mm () 
setElementPosition(source,395.46591,-1858.81592,13.60156) 
setCameraMatrix(source,395.64987,-1868.80786,13.60156,395.46591,-1858.81592,13.60156) 
end 
addEvent("hitt",true) 
addEventHandler("hitt",root,mm) 
  
  
function stopp () 
setCameraTarget(source,source) 
end 
addEvent("stop",true) 
addEventHandler("stop",root,stopp) 

Link to comment

function skinnn () 
  
    if getPlayerMoney(source) >= 500 then 
  
    takePlayerMoney(source, 500) 
  
    id = math.random(46) 
  
    setElementModel(source,id) 
  
    outputChatBox("تم شراء بنجاح",source,0,255,0) 
     
    else  
     
    return outputChatBox ( "لاتملك المال الكافي",source ) 
  
    end 
end 
addEvent("mony",true) 
addEventHandler("mony",root,skinnn) 
Link to comment
function skinnn () 
 if getPlayerMoney (source) >= 500 then 
    takePlayerMoney(source, 500)  
setElementModel(source,46) 
outputChatBox("تم شراء بنجاح",source,0,255,0) 
else 
outputChatBox ("ليس لديك مالاً كافي",source,255,0,0) 
end 
end 
addEvent("mony",true) 
addEventHandler("mony",root,skinnn) 
  
function rrr () 
 if getPlayerMoney (source) >= 500 then 
    takePlayerMoney(source, 500) 
setElementModel(source,46) 
outputChatBox("تم شراء بنجاح",source,0,255,0) 
else 
outputChatBox ("ليس لديك مالاً كافي",source,255,0,0) 
 end 
end 
addEvent("sss",true) 
addEventHandler("sss",root,rrr) 
  
  
  
function mm () 
setElementPosition(source,395.46591,-1858.81592,13.60156) 
setCameraMatrix(source,395.64987,-1868.80786,13.60156,395.46591,-1858.81592,13.60156) 
end 
addEvent("hitt",true) 
addEventHandler("hitt",root,mm) 
  
  
function stopp () 
setCameraTarget(source,source) 
end 
addEvent("stop",true) 
addEventHandler("stop",root,stopp) 

انت شلت خاصية اختيار الشخصية بشكل عشوائي

من 0 الى 46

Link to comment
انا قرات الاكواد ما شفت شي واضح

ولفت انتباهي هذي

math.random(46) 

اتوقع المفروض تكون كذا

math.random(0,46) 

46 = راح يجيب رقم عشوائي من 46 الى تحت

يعني مايطلع فوق 46

0,46 = كذا مخير بين 0 و 46

اتمنى وصلت المعلومة

Link to comment
function skinnn () 
 if getPlayerMoney (source) >= 500 then 
    takePlayerMoney(source, 500)  
setElementModel(source,46) 
outputChatBox("تم شراء بنجاح",source,0,255,0) 
else 
outputChatBox ("ليس لديك مالاً كافي",source,255,0,0) 
end 
end 
addEvent("mony",true) 
addEventHandler("mony",root,skinnn) 
  
function rrr () 
 if getPlayerMoney (source) >= 500 then 
    takePlayerMoney(source, 500) 
setElementModel(source,46) 
outputChatBox("تم شراء بنجاح",source,0,255,0) 
else 
outputChatBox ("ليس لديك مالاً كافي",source,255,0,0) 
 end 
end 
addEvent("sss",true) 
addEventHandler("sss",root,rrr) 
  
  
  
function mm () 
setElementPosition(source,395.46591,-1858.81592,13.60156) 
setCameraMatrix(source,395.64987,-1868.80786,13.60156,395.46591,-1858.81592,13.60156) 
end 
addEvent("hitt",true) 
addEventHandler("hitt",root,mm) 
  
  
function stopp () 
setCameraTarget(source,source) 
end 
addEvent("stop",true) 
addEventHandler("stop",root,stopp) 

انت شلت خاصية اختيار الشخصية بشكل عشوائي

من 0 الى 46

اعتقد سكنات من صفر الي 46 مش موجودين بالكامل و متسلسلين

بعضهم موجود بالفعل لكن غير متسلسلين

Link to comment
انا قرات الاكواد ما شفت شي واضح

ولفت انتباهي هذي

math.random(46) 

اتوقع المفروض تكون كذا

math.random(0,46) 

46 = راح يجيب رقم عشوائي من 46 الى تحت

يعني مايطلع فوق 46

0,46 = كذا مخير بين 0 و 46

اتمنى وصلت المعلومة

يعطيك العافية ما قد جربت الكود

بالارقام

بنجربه بعدين

تحياتي

Link to comment

+

مايبي ينقلي مكان لي محدث انا في اكود هدا

  
  
setElementPosition(source,395.46591,-1858.81592,13.60156) 
  
setCameraMatrix(source,395.64987,-1868.80786,13.60156,395.46591,-1858.81592,13.60156) 
  
end 
addEvent("hitt",true) 
addEventHandler("hitt",root,mm) 

:!:

Link to comment
  
GUIEditor = { 
    label = {}, 
} 
GUIEditor.label[1] = guiCreateStaticImage(467, 447, 189, 75, "r.png", false) 
  
  
GUIEditor.label[2] = guiCreateStaticImage(218, 447, 189, 75, "q.png", false) 
  
  
GUIEditor.label[3] = guiCreateStaticImage(327, 532, 221, 93, "s.png", false) 
  
  
GUIEditor.label[4] = guiCreateStaticImage(279, 379, 159, 51, "CL.png", false) 
  
guiSetVisible(GUIEditor.label[1],false) 
  
guiSetVisible(GUIEditor.label[2],false) 
  
guiSetVisible(GUIEditor.label[3],false) 
  
guiSetVisible(GUIEditor.label[4],false) 
  
  
  
  
mrss = createMarker (377.54077,-1887.06738,7.83594,"cylinder",1,52,38,162,255) 
  
function hit () 
  
  
triggerServerEvent("hitt",localPlayer) 
  
playSound("lol.mp3") 
  
guiSetVisible(GUIEditor.label[1],true) 
  
guiSetVisible(GUIEditor.label[2],true) 
  
guiSetVisible(GUIEditor.label[3],true) 
  
guiSetVisible(GUIEditor.label[4],true) 
  
showCursor(true) 
  
end 
addEventHandler("onClientMarkerHit",mrss,hit) 
  
  
  
  
  
function off () 
  
if source == GUIEditor.label[4] then 
  
playSoundFrontEnd(10) 
  
guiSetVisible(GUIEditor.label[1],false) 
  
guiSetVisible(GUIEditor.label[2],false) 
  
guiSetVisible(GUIEditor.label[3],false) 
  
guiSetVisible(GUIEditor.label[4],false) 
  
showCursor(false) 
  
triggerServerEvent("stop",localPlayer) 
  
end 
  
end 
  
addEventHandler("onClientGUIClick",root,off) 
  
  
  
function oo () 
  
if source == GUIEditor.label[2] then 
  
triggerServerEvent("mony",localPlayer) 
  
playSoundFrontEnd(10) 
  
end 
  
end 
addEventHandler("onClientGUIClick",root,oo) 
  
  
  
  
function skibb () 
  
if source == GUIEditor.label[1] then 
  
playSoundFrontEnd(10) 
  
triggerServerEvent("sss",localPlayer) 
  
end 
  
end 
  
addEventHandler("onClientGUIClick",root,skibb) 

وريني السطور الاتية :

83

101

69

في الكلينت

الفرق بس localplayer

المفروض تكون localPlayer

Edited by Guest
Link to comment
ما ينفع من

0

لي

46

وين شخصية 3 او 4 او 5 او 6

في شخصيات مش موجودة منهم

لو طلع واحدة منهم هيبقا كدا في بق

مشكلة بسيطة وحلها بسيط

تحت

id = math.random(46) 

يحط

if ( id ) then 

end مع

كذا ماراح يكون فيه مشاكـل .

بالنسبة لصاحب الموضوع

بالترايقر الارقمنت الثاني خله كذا

localPlayer

الكود شغال وانا مجربه

Edited by Guest
Link to comment
ما ينفع من

0

لي

46

وين شخصية 3 او 4 او 5 او 6

في شخصيات مش موجودة منهم

لو طلع واحدة منهم هيبقا كدا في بق

مشكلة بسيطة وحلها بسيط

تحت

id = math.random(46) 

يحط

if ( id ) then 

end مع

كذا ماراح يكون فيه مشاكـل .

بالنسبة لصاحب الموضوع

الكود شغال وانا مجربه

triggerServerEvent("stop",localplayer)

شغال و هو عامل كدة ? :~)

جرب تاني

+

ممكن تشرح لي if (id) then

هتعمل ايه في الحالة دي؟

Link to comment
ما ينفع من

0

لي

46

وين شخصية 3 او 4 او 5 او 6

في شخصيات مش موجودة منهم

لو طلع واحدة منهم هيبقا كدا في بق

مشكلة بسيطة وحلها بسيط

تحت

id = math.random(46) 

يحط

if ( id ) then 

end مع

كذا ماراح يكون فيه مشاكـل .

بالنسبة لصاحب الموضوع

بالترايقر الارقمنت الثاني خله كذا

localPlayer

الكود شغال وانا مجربه

triggerServerEvent("stop",localplayer)

شغال و هو عامل كدة ? :~)

جرب تاني

+

ممكن تشرح لي if (id) then

هتعمل ايه في الحالة دي؟

راح يتحقق من الرقم

يعني مثلا في شخصية ايدي حقها مب موجود

راح يتحقق لو ماكان موجود مايجيه خطأ

ولو كان موجود يغير له الشخصية

داري انك فاهم بس جاي تفلسف على مخي

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...