mody134 Posted December 28, 2016 Share Posted December 28, 2016 لما انسخ اسم الحساب ما يتنسخ PPP = getLocalPlayer() GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() INFORM_WND = guiCreateWindow((screenW - 459) / 2, (screenH - 526) / 2, 459, 526, "=[ معلومات اللاعب ]=", false) guiWindowSetSizable(INFORM_WND, false) guiSetAlpha(INFORM_WND, 0.95) guiSetVisible(INFORM_WND,false) GUIEditor.label[1] = guiCreateLabel(158, 41, 151, 26, "=[ السيريال الخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") Serial_Copy = guiCreateButton(158, 86, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(Serial_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[2] = guiCreateLabel(148, 160, 171, 27, "=[ اسم الحساب ألخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[2], "center") AccName_Copy = guiCreateButton(158, 225, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(AccName_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[3] = guiCreateLabel(158, 299, 151, 26, "=[ النك نيم الخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[3], "center") NickName_Copy = guiCreateButton(158, 360, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(NickName_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[4] = guiCreateLabel(0, 402, 460, 15, "===========================================================================", false, INFORM_WND) guiLabelSetColor(GUIEditor.label[4], 215, 0, 0) GUIEditor.label[5] = guiCreateLabel(144, 417, 180, 29, "", false, INFORM_WND) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) Close_Button = guiCreateButton(158, 463, 151, 32, "=[ Close |#| إغلاق ]=", false,INFORM_WND) guiSetProperty(Close_Button, "NormalTextColour", "FFFF0066") Serial_EDIT = guiCreateEdit(1012, 281, 348, 30, "",false,INFORM_WND) guiSetText(Serial_EDIT,"" .. getPlayerSerial()) guiSetAlpha(Serial_EDIT, 0.00) guiEditSetReadOnly(Serial_EDIT, true) Acc__EDIT = guiCreateEdit(1012, 327, 348, 30, "",false,INFORM_WND) guiSetText ( Acc__EDIT,getElementData(localPlayer,"AccountName") ) guiSetAlpha(Acc__EDIT, 0.00) guiEditSetReadOnly(Acc__EDIT, true) NickName_EDIT = guiCreateEdit(1012, 372, 348, 30, "",false,INFORM_WND) guiSetText(NickName_EDIT,"" .. getPlayerName(localPlayer) ) guiSetAlpha(NickName_EDIT, 0.00) guiEditSetReadOnly(NickName_EDIT, true) addEventHandler( "onClientElementDataChange", root, function( dataName, OldValue ) if ( source and dataName == "AccountName" ) then guiGetText ( Acc__EDIT,getElementData(localPlayer,"AccountName") ) end end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) guiSetText(NickName_EDIT,"" .. newNick ) end ) addEventHandler("onClientGUIClick",root, function () if source == Close_Button then if ( guiGetVisible(INFORM_WND) == false ) then showCursor(true) end guiSetVisible ( INFORM_WND, false ) showCursor(false) guiSetInputEnabled(false) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function() if ( source == NickName_Copy ) then local text = guiGetText ( NickName_EDIT ) setClipboard( text ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == NickName_Copy ) then if ( isTimer ( TimerEnabled ) ) then return end guiSetEnabled(NickName_Copy, true) guiSetText ( source, "تم نسخ النك نيم" ) TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, NickName_Copy, true) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function() if ( source == Serial_Copy ) then local text = guiGetText ( Serial_EDIT ) setClipboard( text ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == Serial_Copy ) then if ( isTimer ( TimerEnabled ) ) then return end guiSetEnabled(Serial_Copy, true) guiSetText ( source, "تم نسخ السيريال" ) TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, Serial_Copy, true) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function() if ( source == AccName_Copy ) then local text = guiGetText ( Acc__EDIT ) setClipboard( text ) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == AccName_Copy ) then if ( isTimer ( TimerEnabled ) ) then return end guiSetEnabled(AccName_Copy, true) guiSetText ( source, "تم نسخ الحساب" ) TimerEnabled = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, AccName_Copy, true) end end ) addEventHandler( "onClientElementDataChange", root, function( dataName, OldValue ) if ( source and dataName == "AccountName" ) then guiSetText ( Acc__EDIT,getElementData(localPlayer,"AccountName") ) end end ) ------------------------ addEventHandler("onClientGUIClick",root, function () if source == clsps then guiSetVisible (window, false ) showCursor(false) guiSetInputEnabled(false) end end ) addCommandHandler('Serial', function() guiSetVisible(INFORM_WND,true) showCursor( true ) end ) Link to comment
Kara Posted December 29, 2016 Share Posted December 29, 2016 --Client PPP = getLocalPlayer() GUIEditor = { label = {} } local screenW, screenH = guiGetScreenSize() INFORM_WND = guiCreateWindow((screenW - 459) / 2, (screenH - 526) / 2, 459, 526, "=[ معلومات اللاعب ]=", false) guiWindowSetSizable(INFORM_WND, false) guiSetAlpha(INFORM_WND, 0.95) guiSetVisible(INFORM_WND,false) GUIEditor.label[1] = guiCreateLabel(158, 41, 151, 26, "=[ السيريال الخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") Serial_Copy = guiCreateButton(158, 86, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(Serial_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[2] = guiCreateLabel(148, 160, 171, 27, "=[ اسم الحساب ألخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[2], "center") AccName_Copy = guiCreateButton(158, 225, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(AccName_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[3] = guiCreateLabel(158, 299, 151, 26, "=[ النك نيم الخاص بك ]=", false, INFORM_WND) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[3], "center") NickName_Copy = guiCreateButton(158, 360, 151, 32, "=[ Copy |#| نسخ ]=", false, INFORM_WND) guiSetProperty(NickName_Copy, "NormalTextColour", "FFFF0066") GUIEditor.label[4] = guiCreateLabel(0, 402, 460, 15, "===========================================================================", false, INFORM_WND) guiLabelSetColor(GUIEditor.label[4], 215, 0, 0) GUIEditor.label[5] = guiCreateLabel(144, 417, 180, 29, "", false, INFORM_WND) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 0, 251, 255) guiLabelSetHorizontalAlign(GUIEditor.label[5], "center", false) Close_Button = guiCreateButton(158, 463, 151, 32, "=[ Close |#| إغلاق ]=", false,INFORM_WND) guiSetProperty(Close_Button, "NormalTextColour", "FFFF0066") Serial_EDIT = guiCreateEdit(1012, 281, 348, 30, "",false,INFORM_WND) guiSetText(Serial_EDIT,"" .. getPlayerSerial()) guiSetAlpha(Serial_EDIT, 0.00) guiEditSetReadOnly(Serial_EDIT, true) Acc__EDIT = guiCreateEdit(1012, 327, 348, 30, "",false,INFORM_WND) guiSetText ( Acc__EDIT,getElementData(localPlayer,"AccountName") ) guiSetAlpha(Acc__EDIT, 0.00) guiEditSetReadOnly(Acc__EDIT, true) NickName_EDIT = guiCreateEdit(1012, 372, 348, 30, "",false,INFORM_WND) guiSetText(NickName_EDIT,"" .. getPlayerName(localPlayer) ) guiSetAlpha(NickName_EDIT, 0.00) guiEditSetReadOnly(NickName_EDIT, true) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) guiSetText(NickName_EDIT,"" .. newNick ) end ) addEventHandler("onClientGUIClick",root, function () if source == Close_Button then if ( guiGetVisible(INFORM_WND) == true ) then guiSetVisible ( INFORM_WND, false ) showCursor(false) guiSetInputEnabled(false) end elseif ( source == NickName_Copy ) then if ( isTimer ( TimerEnabled1 ) ) then return end guiSetEnabled(NickName_Copy, true) guiSetText ( source, "تم نسخ النك نيم" ) TimerEnabled1 = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, NickName_Copy, true) local Bicktext = guiGetText ( NickName_EDIT ) setClipboard( Bicktext ) elseif ( source == Serial_Copy ) then local serialtext = guiGetText ( Serial_EDIT ) setClipboard( serialtext ) if ( isTimer ( TimerEnabled2 ) ) then return end guiSetEnabled(Serial_Copy, true) guiSetText ( source, "تم نسخ السيريال" ) TimerEnabled2 = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, Serial_Copy, true) elseif ( source == AccName_Copy ) then if ( isTimer ( TimerEnabled3 ) ) then return end triggerServerEvent("GetAccPlayer",localPlayer) guiSetEnabled(AccName_Copy, true) guiSetText ( source, "تم نسخ الحساب" ) TimerEnabled3 = setTimer ( guiSetText, 3000, 1, source, "=[ Copy |#| نسخ ]=" ) guiSetEnabled(source, false) setTimer(guiSetEnabled, 3000, 1, AccName_Copy, true) end end ) addEvent("sendaccplayer",true) addEventHandler("sendaccplayer",root, function(nameaccp) setClipboard( nameaccp ) end ) ------------------------ addCommandHandler('Serial', function() if (guiGetVisible(INFORM_WND) == false ) then guiSetVisible(INFORM_WND,true) showCursor( true ) else guiSetVisible(INFORM_WND,false) showCursor( false ) end end ) --Server addEvent("GetAccPlayer",true) addEventHandler("GetAccPlayer",root,function () nameacc = getAccountName(getPlayerAccount(source)) if nameacc then triggerClientEvent(source,"sendaccplayer",source,nameacc) end end ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now