Jump to content

كود تغيير النك


nony

Recommended Posts

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

يا شباب سويت كود تغيير النك الي في الشوب بس مايشتغل

كلنت

addEventHandler ("onClientGUIClick", getRootElement(), 
function() 
   if source == GUIEditor_Button[4] then 
   GUIEditor_Window[2] = guiCreateWindow(332,278,158,86,"Change Your Nick",false) 
   GUIEditor_Edit[1] = guiCreateEdit(30,25,95,22,"",false,GUIEditor_Window[2]) 
   GUIEditor_Button[15] = guiCreateButton(88,52,42,25,"Quit",false,GUIEditor_Window[2]) 
   GUIEditor_Button[18] = guiCreateButton(28,52,42,25,"Ok",false,GUIEditor_Window[2]) 
   elseif source == GUIEditor_Button[18] then 
   guiSetVisible (GUIEditor_Window[2], false) 
   triggerServerEvent("NewName",getLocalPlayer()) 
   elseif source == GUIEditor_Button[15] then 
   guiSetVisible (GUIEditor_Window[2], false) 
   end 
end 
 ) 

سيرفر

addEvent("NewName", true) 
addEventHandler("NewName", rootElement, 
function(playerName) 
setPlayerName( source , playerName ) 
outputChatBox("You Have Changed Your Nick !",source,255,255,0,true) 
end ) 

الباقي عليكم ^^

Link to comment
GUIEditor_Window[2] = guiCreateWindow(332,278,158,86,"Change Your Nick",false) 
GUIEditor_Edit[1] = guiCreateEdit(30,25,95,22,"",false,GUIEditor_Window[2]) 
GUIEditor_Button[15] = guiCreateButton(88,52,42,25,"Quit",false,GUIEditor_Window[2]) 
GUIEditor_Button[18] = guiCreateButton(28,52,42,25,"Ok",false,GUIEditor_Window[2]) 
  
addEventHandler ("onClientGUIClick", getRootElement(), 
    function ( ) 
        if source == GUIEditor_Button[4] then 
        guiSetVisible (GUIEditor_Window[2], true ) 
        elseif source == GUIEditor_Button[18] then 
        guiSetVisible (GUIEditor_Window[2], false) 
        triggerServerEvent ( 'NewName', getLocalPlayer( ), guiGetText ( GUIEditor_Edit[1] ) )  
        elseif source == GUIEditor_Button[15] then 
        guiSetVisible (GUIEditor_Window[2], false) 
        end 
    end 
) 

جرب.

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