بالنسبة أن اللوحة ماتظهر و تبيها تفتح بسريال
--Client
MySerial = {["سريالك"] = true}
ShowHide = function()
if MySerial[getPlayerSerial(localPlayer)] then
guiSetVisible(HASSANWnd, not
guiGetVisible(HASSANWnd))
showCursor(not isCursorShowing())
end
end
bindKey("O", "down", ShowHide)
HASSANWnd = guiCreateWindow(278,94,275,422,"",false)
guiSetAlpha(HASSANWnd,1)
guiSetVisible(HASSANWnd, false)
Label = guiCreateLabel(71,28,135,21,":: لوحة الاملاك الخاصة ::",false,HASSANWnd)
guiLabelSetColor(Label,0,255,15)
Button_X = guiCreateButton(227,26,33,17,"X",false,HASSANWnd)
grid = guiCreateGridList(13,60,253,255,false,HASSANWnd)
guiGridListSetSelectionMode(grid,2)
guiGridListAddColumn(grid,"Vehicles",0.2)
Vehicles1 = {
{541},
{421},
{404},
{562},
{415},
{451},
{458},
{560},
{546},
{411},
{589},
}
for i,ve in ipairs(Vehicles1) do
local row = guiGridListAddRow(grid)
guiGridListSetItemText(grid,row,1,ve[1],false,false)
end
spawnBut = guiCreateButton(45,327,185,35,".:: اظهار السيارة ::.",false,HASSANWnd)
destroyBut = guiCreateButton(45,370,185,35,".:: اخفاء السيارة ::.",false,HASSANWnd)
addEvent ("carSpawn", true)
addEvent ("carDestroy", true)
function guiClick (button, state, absoluteX, absoluteY)
if (source == spawnBut) then
triggerServerEvent ("carSpawn", lp)
elseif (source == destroyBut) then
triggerServerEvent ("carDestroy", lp)
end
end
local car = createVehicle (HASSANWnd)
addEventHandler("onVehicleStartEnter", root,
function(player)
if(source==car)then
if (getPlayerSerial(player)~="**********************************")then
cancelEvent()
r,b,g = math.random(0,255)
outputChatBox( "املاك خاصة", player, r, b, g, true )
else
r,b,g = math.random(0,255)
outputChatBox( "مرحباً بك امتمنى لك قيادة جيدة", player, r, b, g, true )
end
end
end)
جرب