MR.GRAND Posted August 18, 2015 Share Posted August 18, 2015 هلا بالعيال .. عندي كود تجربة ابي اسويه ... بس صارت عندي مشكلة صغيرة وه ي اللوحة تطلع لكل الاعبين عند ما اي لاعب يدخل للماركر Clinet -- GUIEditor = { button = {}, label = {} } local screenW, screenH = guiGetScreenSize() Spanel = guiCreateWindow((screenW - 450) / 2, (screenH - 186) / 2, 450, 186, "=|~:~\" Serial Panel \"~:~|=", false) guiWindowSetSizable(Spanel, false) guiSetProperty(Spanel, "CaptionColour", "FF13FFE0") guiSetVisible(Spanel,false) GUIEditor.label[1] = guiCreateLabel(10, 23, 300, 21, " *You Can Copy Your Serial From Button ~Copy !", false, Spanel) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 15, 48, 254) Boox = guiCreateEdit(62, 61, 319, 25, "", false, Spanel) guiEditSetReadOnly(Boox, true) guiSetText(Boox,"" .. getPlayerSerial(),true) GUIEditor.label[2] = guiCreateLabel(10, 125, 261, 23, "# This Panel Created by PRINCE - MR.GRAND !", false, Spanel) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 254, 18, 90) GUIEditor.label[3] = guiCreateLabel(10, 125, 261, 23, "# This Panel Created by PRINCE - MR.GRAND !", false, Spanel) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 254, 18, 90) GUIEditor.label[4] = guiCreateLabel(10, 125, 261, 23, "# This Panel Created by PRINCE - MR.GRAND !", false, Spanel) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 254, 18, 90) GUIEditor.label[5] = guiCreateLabel(10, 125, 261, 23, "# This Panel Created by PRINCE - MR.GRAND !", false, Spanel) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 254, 18, 90) GUIEditor.button[1] = guiCreateButton(189, 90, 72, 29, "Copy", false, Spanel) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF4EFE11") GUIEditor.button[2] = guiCreateButton(368, 148, 72, 29, "Close", false, Spanel) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFE1010") GUIEditor.label[6] = guiCreateLabel(10, 23, 300, 21, " *You Can Copy Your Serial From Button ~Copy !", false, Spanel) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 15, 48, 254) GUIEditor.label[7] = guiCreateLabel(10, 23, 300, 21, " *You Can Copy Your Serial From Button ~Copy !", false, Spanel) guiSetFont(GUIEditor.label[7], "default-bold-small") guiLabelSetColor(GUIEditor.label[7], 15, 48, 254) GUIEditor.label[8] = guiCreateLabel(10, 23, 300, 21, " *You Can Copy Your Serial From Button ~Copy !", false, Spanel) guiSetFont(GUIEditor.label[8], "default-bold-small") guiLabelSetColor(GUIEditor.label[8], 15, 48, 254) local Marker = createMarker ( -714.51135, 962.55023, 11.24754, "cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler('onClientMarkerHit',Marker, function() if ( getElementType ( localPlayer ) ~= "Player" )then guiSetVisible(Spanel,true) showCursor(true) else return end end ) addEventHandler('onClientGUIClick',root, function() if source == GUIEditor.button[1] then triggerServerEvent("TAKE_OK",localPlayer) guiSetVisible(Spanel,false) showCursor(false) end end ) Link to comment
iMr.SFA7 Posted August 18, 2015 Share Posted August 18, 2015 addEventHandler('onClientMarkerHit',Marker, function( hitPlayer ) if ( getElementType ( hitPlayer) == "player" )then guiSetVisible(Spanel,true) showCursor(true) else return end end,false ) Link to comment
#DRAGON!FIRE Posted August 18, 2015 Share Posted August 18, 2015 addEventHandler ( 'onClientMarkerHit', resourceRoot, function ( player_ ) if ( source == Marker ) then if ( player_ == localPlayer ) then guiSetVisible(Spanel,true) showCursor(true) end end end ) Link to comment
g.iuvyydky Posted August 18, 2015 Share Posted August 18, 2015 addEventHandler('onClientMarkerHit',Marker, function( hitPlayer ) if ( getElementType ( hitPlayer) == "player" )then guiSetVisible(Spanel,true) showCursor(true) else return end end,false ) كودك ماشتغل تمت الافادة من قبل #زاحف Link to comment
g.iuvyydky Posted August 18, 2015 Share Posted August 18, 2015 ابي بس فنكشن صغير , وهو اللي مثلا جبت فلوس الاعب getPlayerMoney() بس أبي يتحقق إذا فلوسه اقل من مثلا 1000 إذا تحقق أن فلوسه اقل من يسوي return Link to comment
iMr.SFA7 Posted August 18, 2015 Share Posted August 18, 2015 if getPlayerMoney(player) < 1000 then البلاير هنا ماهوب شيء أجباري هذا يعتمد ع كودك ! Link to comment
MR.GRAND Posted August 18, 2015 Author Share Posted August 18, 2015 سويته بطريقة ثانية خلاص بس الديبوق يقول attemp to compare number with bollean Link to comment
#DRAGON!FIRE Posted August 18, 2015 Share Posted August 18, 2015 بـ جانب كلاينت ما ينفع .. لازم التحقق يكون بجانب سيرفر Link to comment
MR.GRAND Posted August 18, 2015 Author Share Posted August 18, 2015 Server side -- addEvent('TAKE_OK',true) addEventHandler('TAKE_OK',root, function(thePlayer) if (getPlayerMoney(thePlayer) > 1200) then giveWeapon(source,30,500) -- ID = رقم السلاح , Ammo = عدد الطلقات takePlayerMoney(source,1200) else return end end ) Link to comment
#DRAGON!FIRE Posted August 18, 2015 Share Posted August 18, 2015 addEvent ( 'TAKE_OK', true ) addEventHandler ( 'TAKE_OK', root, function ( ) if ( getPlayerMoney ( source ) >= 1200 ) then giveWeapon ( source, 30, 500 ) -- ID = ??? ?????? , Ammo = ??? ??????? takePlayerMoney ( source, 1200 ) 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