Jump to content

مشكلة


Mbtdaa

Recommended Posts

السلام عليكم وش المشكلة

سيرفر

  
bindKey ( "F2" , "down" , function()
 
if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then
 guiSetVisible ( GUIEditor_Window[1] ,false )
 showCursor (false )
 guiSetInputEnabled(false)
 
 elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then
 guiSetVisible ( GUIEditor_Window[1] ,true )
 showCursor (false )
 guiSetInputEnabled(true)
 playSound("mrsl6an.wav")
 
 end
 end
 )
       
       
       
outputChatBox ("#007fff[shop]: #007fff.:[ #999999By #999999Mr.SL6AN #999999#007fff]", 255, 255, 255, true)
outputChatBox ("#007fff[Open]: #007fffPress #007fff'F2' #007fffto open #007fffThe #007fffshop 1.1.!", 255, 255, 255, true)
 
 
addEventHandler("onClientGUIClick",getRootElement(),
        function()
            if ( source == GUIEditor_Button[17] ) then
                     triggerServerEvent("onLoginAndRegister",getRootElement(),getLocalPlayer(),guiGetText(GUIEditor_Edit[1]), guiGetText(GUIEditor_Edit[2]))
            end
        end)
 
 
function refreshStats()
   if guiGetVisible(GUIEditor_Image[1]) then
      guiSetText(GUIEditor_Label[17],getPlayerPing(localPlayer))
      guiSetText(GUIEditor_Label[16],"$"..getPlayerMoney())
      guiSetText(GUIEditor_Label[15],getPlayerName(localPlayer))
      guiSetText(GUIEditor_Label[19],getPlayerSerial())
      guiSetText(GUIEditor_Label[14],getElementModel(localPlayer))
   end
end
addEventHandler("onClientRender", root, refreshStats)
 
 
------------------------------------command buy
function onGuiClick (button, state, absoluteX, absoluteY)
if (source == GUIEditor_Button[1]) then
triggerServerEvent ("buyFlip", getLocalPlayer())
elseif (source == GUIEditor_Button[4]) then
triggerServerEvent ("buyNitro", getLocalPlayer())
elseif (source == GUIEditor_Button[2]) then
triggerServerEvent ("buyRepair", getLocalPlayer())
elseif (source == GUIEditor_Button[5]) then
triggerServerEvent ("buyInvisible", getLocalPlayer())
end
end
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick)
 
 
 
----------------------------------------------------------------------------Health label
function refreshStats()
if guiGetVisible(GUIEditor_Image[1],true) then
   GUIEditor_Label[16](GUIEditor_Label[16]," "..getElementHealth ( getLocalPlayer() ))
else
   guiSetText(GUIEditor_Label[16]," "..getElementHealth ( getLocalPlayer() ))
    end
end
addEventHandler("onClientRender", getRootElement(), refreshStats)
 
 
 
triggerServerEvent("getIP", getLocalPlayer())triggerServerEvent("ip",localPlayer)
addEvent("ip",true)
addEventHandler("ip",root,
    function(ip)
        guiSetText(GUIEditor_Label[18],tostring(ip))  
    end
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[12] ) then
 
 
triggerServerEvent("givem4",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[2] ) then
 
 
 
 
triggerServerEvent("gived",getLocalPlayer())
 
end
 end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[9] ) then
 
triggerServerEvent("givemk",getLocalPlayer())
 
end
 
end
 
 
)
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[7] ) then
 
triggerServerEvent("givemp5",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[4] ) then
 
triggerServerEvent("TEC-9",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[16] ) then
 
triggerServerEvent("givesnip",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[3] ) then
 
triggerServerEvent("giveuz",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[8] ) then
 
triggerServerEvent("shozn",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[6] ) then
 
triggerServerEvent("givesw",getLocalPlayer())
 
end
 
end
 
 
)
 
 
  addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  GUIEditor_Button[10] ) then
 
triggerServerEvent("givecolt",getLocalPlayer())
 
end
 
end
)
 
 
 
 
Link to comment

جرب هذا بس انت ضيف الازرار والشوبات والاسلحة

  
    root = getRootElement() 
localPlayer = getLocalPlayer() 
  
outputChatBox ("#007fff[shop]: #007fff.:[ #999999By #999999Mr.SL6AN #999999#007fff]", 255, 255, 255, true) 
*-outputChatBox ("#007fff[Open]: #007fffPress #007fff'F2' #007fffto open #007fffThe #007fffshop 1.1.!", 255, 255, 255, true 
shopWindow = guiCreateWindow(114,153,568,330,"اسم الشوب",false) 
guiSetVisible (shopWindow, false) 
guiWindowSetSizable(shopWindow,false) 
guiWindowSetMovable(shopWindow,true) 
tabPanel = guiCreateTabPanel(11,23,599,499,false,shopWindow) 
tab1 = guiCreateTab("اسم التاب",tabPanel) 
  
bindKey ( "F2" , "down" , function() 
  
if ( guiGetVisible ( shopWindow ) == true ) then 
 guiSetVisible ( shopWindow ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
  
 elseif ( guiGetVisible ( shopWindow ) == false ) then 
 guiSetVisible ( shopWindow ,true ) 
 showCursor (false ) 
 guiSetInputEnabled(true) 
 playSound("open.mp3") 
  
 end 
 end 
 ) 
  

Link to comment
ركبته وشغلته

ولما اشتغل

ماكني حاط اكواد الشراء والانفو والصور ماجاء اي شي

بس جاء الازرار واليبول

المشكلة في gui حطه في الموضوع

Edited by Guest
Link to comment
  • Other Languages Moderators
function refreshStats() 
if guiGetVisible(GUIEditor_Image[1],true) then 
   GUIEditor_Label[16](GUIEditor_Label[16]," "..getElementHealth ( getLocalPlayer() )) 
else 
   guiSetText(GUIEditor_Label[16]," "..getElementHealth ( getLocalPlayer() )) 
    end 
end 
addEventHandler("onClientRender", getRootElement(), refreshStats) 
  
  
  
triggerServerEvent("getIP", getLocalPlayer())triggerServerEvent("ip",localPlayer) 
addEvent("ip",true) 
addEventHandler("ip",root, 
    function(ip) 
        guiSetText(GUIEditor_Label[18],tostring(ip))   
    end 
) 

التصحيح

function refreshStats() 
     if guiGetVisible(GUIEditor_Image[1],true) then 
          guiSetText(GUIEditor_Label[16],getElementHealth(localPlayer)) 
     end 
end 
addEventHandler("onClientRender", getRootElement(), refreshStats) 
  
  
  
triggerServerEvent("ip",localPlayer,localPlayer) 
addEvent("ip",true) 
addEventHandler("ip",root, 
    function(ip) 
        guiSetText(GUIEditor_Label[18],tostring(ip))   
    end 
) 

و أضن عندك أخطاء ثانية

أكتب في أف8

/debugscript 3

وقل لنا وش الأخطاء الي تجي

Link to comment
  • Other Languages Moderators
ممممم بدلت الكود بتصحيح حقك ياتابل

ولما خشيت السيرفر مالقيت المود بالادمنية عشان اشغله

.

حط الكود كامل + رتب الكود و أحذف المسافات الي مالها داعي

+

هنا فيه خطأ

function invissble() 
    if ( getPlayerMoney (source) >= 15000 ) then 
        takePlayerMoney(source, 15000) 
        outputChatBox("#007fff[#007fff  #007fff]:#007fff has bought a #007fff[ #007fffInvisible #007fff]", source, 255, 255, 0, true) 
        setElementAlpha(getPedOccupiedVehicle(source),0) 
        setElementAlpha(source,0) 
        setPlayerNametagShowing(source, false) 
        setTimer( setElementAlpha, 60000, 1, source, 500, true) 
        setTimer( setElementAlpha, 60000, 1, getPedOccupiedVehicle(source), 500, true) 
        setTimer( setPlayerNametagShowing, 60000, 1, source, true, true) 
    else 
        outputChatBox("#007fffYou Dont Have [#99999915,000 #007fff]#007fff", source, 255, 255, 255, true) 
    end 
end 
addEvent("buyInvisible", true) 
addEventHandler("buyInvisible", root,invissble) 

التصحيح

function invissble() 
    if (getPlayerMoney(source) >= 15000) then 
        takePlayerMoney(source, 15000) 
        outputChatBox("#007fff[#007fff  #007fff]:#007fff has bought a #007fff[ #007fffInvisible #007fff]", source, 255, 255, 0, true) 
        setElementAlpha(source,0) 
        setPlayerNametagShowing(source, false) 
        setTimer(setElementAlpha, 60000, 1, source, 255) 
        setTimer(setPlayerNametagShowing, 60000, 1, source, true) 
    else 
        outputChatBox("#007fffYou Dont Have [#99999915,000 #007fff]#007fff", source, 255, 255, 255, true) 
    end 
end 
addEvent("buyInvisible", true) 
addEventHandler("buyInvisible", root,invissble) 

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