Jump to content

تعديل بسيط في كود


Recommended Posts

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

كيفكم ان شاء الله بخير

بدي طلب بسيط في كود

ابي العنوان ياللي هو

label

يجيب اسم اللاعب انا حاولت لكن تجاربي فاشلة

ابي تلميح و انا بحاول بالباقي وشكراً

GUIEditor = { 
    label = {}, 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 393) / 2, (screenH - 356) / 2, 393, 356, "ظام المعلومات الخاص بك سيرفر مهمات الاجرام", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible (GUIEditor.window[1]  , false ) 
  
        GUIEditor.label[1] = guiCreateLabel(9, 24, 379, 20, "name", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        guiLabelSetColor(GUIEditor.label[1], 254, 254, 254) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center")         
    end 
) 
bindKey ( "F2" , "down" , function() 
        guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) 
 end) 
  
  
function Player_information ( button ) 
    guiSetText(GUIEditor.label[1], " name ( "..getPlayerName.." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", root, Player_information) 

Link to comment
فقـط المفـروض تحط ارقمنتاتـها والارقمنت الوحيد وهـو اللاعب أنت حط اللاعب هو اللوكال بلايـر getPlayerName أنت حطيت الوظيفة
function Player_information ( button ) 
    guiSetText(GUIEditor.label[1], " name ( "..Player.." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", local, Player_information) 

كدة ؟؟

Link to comment
function Player_information ( button ) 
    guiSetText(GUIEditor.label[1], " name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", local, Player_information) 

شكراً

سويتها + سويت الفلوس كمان لكن الفلوس اذا كان معك مثلا 0

تظهر باللوحة 0 لكن اذا اعطيك نفسك فلوس تضل 0

بس اذا سويت ريستارت للسكربت تجيب الفلوس الحالية مب 0

يعني ابيها تجيب الفلوس تلقائي كل ما آخذ فلوس تجيب الفلوس على طول في اللوحة

يعني ما اضطر اعيد تشغيل اللوحة ميشان تجيب الفلوس الحالية

  
function Player_information ( label ) 
    guiSetText(GUIEditor.label[1], "name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[2], "money ( "..getPlayerMoney(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[3], "serial ( "..getPlayerSerial(localPlayer).." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", root, Player_information) 

Link to comment

function Player_information ( label ) 
    guiSetText(GUIEditor.label[3], "serial ( "..getPlayerSerial().." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", root, Player_information) 
  
addEventHandler('onClientRender', root, function() 
    guiSetText(GUIEditor.label[1], "name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[2], "money ( "..getPlayerMoney(localPlayer).." )" ,0,255,0) 
end) 
Link to comment
function Player_information ( label ) 
    guiSetText(GUIEditor.label[3], "serial ( "..getPlayerSerial().." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", root, Player_information) 
  
addEventHandler('onClientRender', root, function() 
    guiSetText(GUIEditor.label[1], "name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[2], "money ( "..getPlayerMoney(localPlayer).." )" ,0,255,0) 
end) 

شكراً لك يالغلا تمت الافادة

Link to comment

كلينت رندر :shock::shock:

هيك افضل ومافي لاق :D:D

  
GUIEditor = { 
    label = {}, 
    window = {} 
} 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 393) / 2, (screenH - 356) / 2, 393, 356, "ظام المعلومات الخاص بك سيرفر مهمات الاجرام", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible (GUIEditor.window[1]  , false ) 
  
        GUIEditor.label[1] = guiCreateLabel(9, 24, 379, 20, "name", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        guiLabelSetColor(GUIEditor.label[1], 254, 254, 254) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center")        
  
function  Player_information ( ) 
    guiSetText(GUIEditor.label[1], "name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[2], "money ( "..getPlayerMoney(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[3], "serial ( "..getPlayerSerial(localPlayer).." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", root, Player_information) 
addEventHandler("onClientPlayerChangeNick", root, Player_information) 
  
bindKey ( "F2" , "down" ,  
function( ) 
    guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) 
            Player_information ( ) 
end ) 
Link to comment
كلينت رندر :shock::shock:

هيك افضل ومافي لاق :D:D

  
GUIEditor = { 
    label = {}, 
    window = {} 
} 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 393) / 2, (screenH - 356) / 2, 393, 356, "ظام المعلومات الخاص بك سيرفر مهمات الاجرام", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible (GUIEditor.window[1]  , false ) 
  
        GUIEditor.label[1] = guiCreateLabel(9, 24, 379, 20, "name", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        guiLabelSetColor(GUIEditor.label[1], 254, 254, 254) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center")        
  
function  Player_information ( ) 
    guiSetText(GUIEditor.label[1], "name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[2], "money ( "..getPlayerMoney(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[3], "serial ( "..getPlayerSerial(localPlayer).." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", root, Player_information) 
addEventHandler("onClientPlayerChangeNick", root, Player_information) 
  
bindKey ( "F2" , "down" ,  
function( ) 
    guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) 
            Player_information ( ) 
end ) 

وتقول لي اعتزل البرمجة :lol:

منور سوكينج :D

    guiSetText(GUIEditor.label[1], "name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[2], "money ( "..getPlayerMoney(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[3], "serial ( "..getPlayerSerial(localPlayer).." )" ,0,255,0) 
  

X

int getPlayerMoney ( ) 
  

+

getPlayerSerial 

Server-only function

:D:arrowup:

Link to comment

تراني ناسخ الكود يلي سواه وعدلت عليه , شوف الاول مين

يلي مسوي الكود من اساسه

انا مسوي تعديل بسيط له مشان مايصير لاق

يا نفسسيهه :roll:

Link to comment
كلينت رندر :shock::shock:

هيك افضل ومافي لاق :D:D

  
GUIEditor = { 
    label = {}, 
    window = {} 
} 
local screenW, screenH = guiGetScreenSize() 
        GUIEditor.window[1] = guiCreateWindow((screenW - 393) / 2, (screenH - 356) / 2, 393, 356, "ظام المعلومات الخاص بك سيرفر مهمات الاجرام", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetVisible (GUIEditor.window[1]  , false ) 
  
        GUIEditor.label[1] = guiCreateLabel(9, 24, 379, 20, "name", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        guiLabelSetColor(GUIEditor.label[1], 254, 254, 254) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center")        
  
function  Player_information ( ) 
    guiSetText(GUIEditor.label[1], "name ( "..getPlayerName(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[2], "money ( "..getPlayerMoney(localPlayer).." )" ,0,255,0) 
    guiSetText(GUIEditor.label[3], "serial ( "..getPlayerSerial(localPlayer).." )" ,0,255,0) 
end 
addEventHandler("onClientResourceStart", root, Player_information) 
addEventHandler("onClientPlayerChangeNick", root, Player_information) 
  
bindKey ( "F2" , "down" ,  
function( ) 
    guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
        showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) 
            Player_information ( ) 
end ) 

كودك بـيجيب فـلوس اللاعـب عند تحميل الكلنت 'عند تشغيـل السكربت' يعني الفلوس ما راح تتحدث الا بعد ما يغير اللاعب اسمه أو يغلـق اللوحة ويفـتحها وهو يبيها تتحدث؟

Link to comment

سيريال اللاعب سيرفر

GUIEditor = { 
label = {}, 
window = {}} 
local screenW, screenH = guiGetScreenSize() 
GUIEditor.window[1] = guiCreateWindow((screenW - 393) / 2, (screenH - 356) / 2, 393, 356, "ظام المعلومات الخاص بك سيرفر مهمات الاجرام", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
guiSetVisible (GUIEditor.window[1]  , false ) 
GUIEditor.label[1] = guiCreateLabel(9, 24, 379, 20, '', false, GUIEditor.window[1]) 
GUIEditor.label[2] = guiCreateLabel(9, 24+20, 379, 20, '', false, GUIEditor.window[1]) 
GUIEditor.label[3] = guiCreateLabel(9, 24+40, 379, 20, '', false, GUIEditor.window[1]) 
  
guiSetFont(GUIEditor.label[1], "default-bold-small") 
guiLabelSetColor(GUIEditor.label[1], 254, 254, 254) 
guiLabelSetVerticalAlign(GUIEditor.label[1], "center")   
  
function refresh_() 
triggerServerEvent("players", localPlayer) 
end 
addEvent('info',true) 
addEventHandler ("info",root,function (Serial) 
guiSetText (GUIEditor.label[1], "Your Name : "..getPlayerName(localPlayer):gsub("#%x%x%x%x%x%x", "")) 
guiSetText (GUIEditor.label[2], "Your Money : "..tostring(getPlayerMoney ( ))) 
guiSetText (GUIEditor.label[3], "Your Serial : "..Serial) 
end) 
-------- 
bindKey("F2", "down",function ()   
if guiGetVisible (GUIEditor.window[1] ) then    
guiSetVisible ( GUIEditor.window[1], false )    
showCursor(false)   
if isTimer (timer) then killTimer (timer) end 
else 
guiSetVisible ( GUIEditor.window[1], true )   
showCursor(true)   
timer = setTimer (refresh_, 100,0) 
end   
end) 

addEvent("players", true) 
addEventHandler("players", root,function () 
triggerClientEvent(source, "info", source,getPlayerSerial(source)) 
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...