Jump to content

[طلب كود]


[Moon]

Recommended Posts

8 minutes ago, iPrestege said:

هذي تكون كذا :

 


Ammo = guiCreateEdit ( 208,276,120,49,'',false,Window );

 

في مشكلة

وحطيت اشارة - والفلوس و صارت اشتري بسالب وتزود فلوس editboxالحروف يقول لي ب شات انه غلط لكن يبان اني كتبت بالحروف ب

local ammount  = guiGetText ( Ammo );
    if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( ';Error only numbers allowed!',200,0,0 );
elseif (source == GUIEditor.button[1]) then 
    triggerServerEvent("Weapon.Shop.A",localPlayer,ammount) 

Edited by [Moon]
Link to comment
Just now, [Moon] said:

في مشكلة

وحطيت اشارة - والفلوس و صارت اشتري بسالب وتزود فلوس editboxالحروف يقول لي ب شات انه غلط لكن يبان اني كتبت بالحروف ب

 

وش قصدك وضح اكثر كود سحب الفلوس لازم تحقق انة اعلى من اللي مع الاعب او انة الرصاص اعلى من واحد مثلاً سوي تحقق انة اكبر من صفر

 

if guiGetText > 0 then 

  • Like 1
Link to comment
3 minutes ago, iPrestege said:

 

وش قصدك وضح اكثر كود سحب الفلوس لازم تحقق انة اعلى من اللي مع الاعب او انة الرصاص اعلى من واحد مثلاً سوي تحقق انة اكبر من صفر

 

if guiGetText > 0 then 

addEventHandler("onClientGUIClick",root,function() 
local ammount  = guiGetText ( Ammo );
    if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( ';Error only numbers allowed!',200,0,0 );
elseif (source == GUIEditor.button[1]) then 
    triggerServerEvent("Weapon.Shop.A",localPlayer,ammount) 
elseif (source == GUIEditor.button[2]) then --
    triggerServerEvent("Weapon.Shop.B",localPlayer,ammount) 
elseif (source == GUIEditor.button[3]) then 
    triggerServerEvent("Weapon.Shop.C",localPlayer,ammount)
elseif (source == GUIEditor.button[4]) then 
    triggerServerEvent("Weapon.Shop.D",localPlayer,ammount)
elseif (source == GUIEditor.button[5]) then 
    triggerServerEvent("Weapon.Shop.E",localPlayer,ammount)
elseif (source == GUIEditor.button[6]) then 
    triggerServerEvent("Weapon.Shop.F",localPlayer,ammount)
elseif (source == GUIEditor.button[7]) then 
    triggerServerEvent("Weapon.Shop.H",localPlayer,ammount)
elseif (source == GUIEditor.button[8]) then 
    triggerServerEvent("Weapon.Shop.I",localPlayer,ammount)
end
end 
)

شف وش سالفة الوظيفة لاني متصل ب سيرفر و اليوم اضغط ع لوحة gui يطلع لي كلام بشات 
Edited by [Moon]
Link to comment
addEventHandler( 'onClientGUIClick',root,
    function (          ) 
    local ammount  = guiGetText ( Ammo );
    if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( 'Error only numbers allowed!',200,0,0 );
    end
 if ( source == GUIEditor.button[1] ) then 
     triggerServerEvent("Weapon.Shop.A",localPlayer,ammount ) 
elseif (source == GUIEditor.button[2]) then --
    triggerServerEvent("Weapon.Shop.B",localPlayer,ammount) 
elseif (source == GUIEditor.button[3]) then 
    triggerServerEvent("Weapon.Shop.C",localPlayer,ammount)
elseif (source == GUIEditor.button[4]) then 
    triggerServerEvent("Weapon.Shop.D",localPlayer,ammount)
elseif (source == GUIEditor.button[5]) then 
    triggerServerEvent("Weapon.Shop.E",localPlayer,ammount)
elseif (source == GUIEditor.button[6]) then 
    triggerServerEvent("Weapon.Shop.F",localPlayer,ammount)
elseif (source == GUIEditor.button[7]) then 
    triggerServerEvent("Weapon.Shop.H",localPlayer,ammount)
elseif (source == GUIEditor.button[8]) then 
    triggerServerEvent("Weapon.Shop.I",localPlayer,ammount)
    end
end 
)

 

  • Like 1
Link to comment
9 minutes ago, iPrestege said:

addEventHandler( 'onClientGUIClick',root,
    function (          ) 
    local ammount  = guiGetText ( Ammo );
    if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( 'Error only numbers allowed!',200,0,0 );
    end
 if ( source == GUIEditor.button[1] ) then 
     triggerServerEvent("Weapon.Shop.A",localPlayer,ammount ) 
elseif (source == GUIEditor.button[2]) then --
    triggerServerEvent("Weapon.Shop.B",localPlayer,ammount) 
elseif (source == GUIEditor.button[3]) then 
    triggerServerEvent("Weapon.Shop.C",localPlayer,ammount)
elseif (source == GUIEditor.button[4]) then 
    triggerServerEvent("Weapon.Shop.D",localPlayer,ammount)
elseif (source == GUIEditor.button[5]) then 
    triggerServerEvent("Weapon.Shop.E",localPlayer,ammount)
elseif (source == GUIEditor.button[6]) then 
    triggerServerEvent("Weapon.Shop.F",localPlayer,ammount)
elseif (source == GUIEditor.button[7]) then 
    triggerServerEvent("Weapon.Shop.H",localPlayer,ammount)
elseif (source == GUIEditor.button[8]) then 
    triggerServerEvent("Weapon.Shop.I",localPlayer,ammount)
    end
end 
)

 

ولله ي فهد م زبط 
نفس الحكاية احط العدد -999 وتجيني فلوس مؤجب + اضغط بنص بلوحة ثانيه تجي Error only numbers allowed!

Link to comment
addEventHandler( 'onClientGUIClick',root,
    function (          ) 
    for i = 1,8 do 
        if source == GUIEditor.button[i] then
        local ammount  = guiGetText ( Ammo );
    if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( 'Error only numbers allowed!',200,0,0 );
         end
    end
end
 if ( source == GUIEditor.button[1] ) then 
     triggerServerEvent("Weapon.Shop.A",localPlayer,ammount ) 
elseif (source == GUIEditor.button[2]) then --
    triggerServerEvent("Weapon.Shop.B",localPlayer,ammount) 
elseif (source == GUIEditor.button[3]) then 
    triggerServerEvent("Weapon.Shop.C",localPlayer,ammount)
elseif (source == GUIEditor.button[4]) then 
    triggerServerEvent("Weapon.Shop.D",localPlayer,ammount)
elseif (source == GUIEditor.button[5]) then 
    triggerServerEvent("Weapon.Shop.E",localPlayer,ammount)
elseif (source == GUIEditor.button[6]) then 
    triggerServerEvent("Weapon.Shop.F",localPlayer,ammount)
elseif (source == GUIEditor.button[7]) then 
    triggerServerEvent("Weapon.Shop.H",localPlayer,ammount)
elseif (source == GUIEditor.button[8]) then 
    triggerServerEvent("Weapon.Shop.I",localPlayer,ammount)
    end
end 
)

 

 

معليش مانتبهت حطيتها بالروت +  جرب الحين :/ ؟ ماني فاهم وش اللي تسوية بالضبط

  • Like 1
Link to comment
22 minutes ago, iPrestege said:

addEventHandler( 'onClientGUIClick',root,
    function (          ) 
    for i = 1,8 do 
        if source == GUIEditor.button[i] then
        local ammount  = guiGetText ( Ammo );
    if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( 'Error only numbers allowed!',200,0,0 );
         end
    end
end
 if ( source == GUIEditor.button[1] ) then 
     triggerServerEvent("Weapon.Shop.A",localPlayer,ammount ) 
elseif (source == GUIEditor.button[2]) then --
    triggerServerEvent("Weapon.Shop.B",localPlayer,ammount) 
elseif (source == GUIEditor.button[3]) then 
    triggerServerEvent("Weapon.Shop.C",localPlayer,ammount)
elseif (source == GUIEditor.button[4]) then 
    triggerServerEvent("Weapon.Shop.D",localPlayer,ammount)
elseif (source == GUIEditor.button[5]) then 
    triggerServerEvent("Weapon.Shop.E",localPlayer,ammount)
elseif (source == GUIEditor.button[6]) then 
    triggerServerEvent("Weapon.Shop.F",localPlayer,ammount)
elseif (source == GUIEditor.button[7]) then 
    triggerServerEvent("Weapon.Shop.H",localPlayer,ammount)
elseif (source == GUIEditor.button[8]) then 
    triggerServerEvent("Weapon.Shop.I",localPlayer,ammount)
    end
end 
)

 

 

معليش مانتبهت حطيتها بالروت +  جرب الحين :/ ؟ ماني فاهم وش اللي تسوية بالضبط

خلاص ضبط يعطيك العآفيةة م قصرت # ^_^

Link to comment

هذا الكود الصحيح اللي استخدمه الاخ مون للي يحتاجة عدلته وارسلتة خاص :

 

addEventHandler( 'onClientGUIClick',root,
    function (          ) 
    for i = 1,8 do 
        if source == GUIEditor.button[i] then
         ammount  = guiGetText ( Ammo );
     if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( 'Error only numbers allowed!',200,0,0 );
     end
        if tonumber ( ammount ) < 0 then return outputChatBox ( 'must be over 0' ) end
     end
end
 if ( source == GUIEditor.button[1] ) then 
    triggerServerEvent("Weapon.Shop.A",localPlayer,ammount )       
elseif (source == GUIEditor.button[2]) then --
    triggerServerEvent("Weapon.Shop.B",localPlayer,ammount) 
elseif (source == GUIEditor.button[3]) then 
    triggerServerEvent("Weapon.Shop.C",localPlayer,ammount)
elseif (source == GUIEditor.button[4]) then 
    triggerServerEvent("Weapon.Shop.D",localPlayer,ammount)
elseif (source == GUIEditor.button[5]) then 
    triggerServerEvent("Weapon.Shop.E",localPlayer,ammount)
elseif (source == GUIEditor.button[6]) then 
    triggerServerEvent("Weapon.Shop.F",localPlayer,ammount)
elseif (source == GUIEditor.button[7]) then 
    triggerServerEvent("Weapon.Shop.H",localPlayer,ammount)
elseif (source == GUIEditor.button[8]) then 
    triggerServerEvent("Weapon.Shop.I",localPlayer,ammount)
    end
end 
)

 

 

+Anytime

  • Like 1
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...