Jump to content

مشكلة صغيرة :D


Recommended Posts

هلا بالعيال .. عندي كود تجربة ابي اسويه ... بس صارت عندي مشكلة صغيرة

وه ي اللوحة تطلع لكل الاعبين عند ما اي لاعب يدخل للماركر

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

:|

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

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