Jump to content

[طلب كود]


[Moon]

Recommended Posts

Posted

السلام عليكم ورحمة الله وبركاته

يا اخوان

سويت لي لوحة

editBoXوابي امنع الحروف + الرموز ب 

لان مسوي لوحة شوب وابي مساعدتكم 

ضرورررري

Posted (edited)
1 hour ago, iPrestege said:

طيب يعني أسوي كذا ؟ 

        Ammo = guiCreateEdit(208, 276, 120, 49, ""..tonumber(money), false, Window)
آو كذأ ؟
local ammount = guiGetText(Ammo,tonumber)

Edited by [Moon]
Posted
1 minute ago, iPrestege said:

local ammount  = guiGetText ( Ammo );
    if ( ammount and not tonumber ( ammount ) ) then return 
        outputChatBox ( 'Error only numbers allowed!',200,0,0 );
    end

 

آلله يعطيك العأفية بروح أجربه

Posted (edited)
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]
Posted
Just now, [Moon] said:

في مشكلة

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

 

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

 

if guiGetText > 0 then 

  • Like 1
Posted (edited)
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]
Posted
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
Posted
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!

Posted
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
Posted
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 
)

 

 

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

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

Posted

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

 

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

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