Jump to content

Rockyz

Members
  • Posts

    1,862
  • Joined

  • Days Won

    8

Everything posted by Rockyz

  1. عطيته مثال على outputChatBox لا اكثر ولا اقل
  2. addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) outputChatBox ( "TEXT ......", 0, 255, 0, true ) end )
  3. Rockyz

    طلب

    تسوي جدول وتحط فيه اسمه الرو table = { {"Health"} } تسوي لوب على جميع محتويات الجدول وتسوي guiGridListAddRow guiGridListSetItemText الحين نجي لما يضغط ع القريد لست يصير شي تستخدم : 'onClientGUIDoubleClick' guiGridListGetSelectedItem guiGridListGetItemText مثال : table = { {'Health'} } grid = guiCreateGridList ( ... ) for k, v in ipairs ( table ) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, 1, v[1], false, false ) end addEventHandler ( 'onClientGUIDoubleClick', root, function ( ) if ( source == grid ) then if ( guiGridListGetSelectedItem ( grid ) ~= -1 ) then local textt = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if ( textt == 'Health' ) then outputChatBox ( 'Health.' ) end end end end ) مثال ثاني اذا ضغطت زر يزود دمك ( طبعا هذا بس مثال ) table = { {'Health1' }, {'Health2' } } grid = guiCreateGridList ( ... ) btn = guiCreateButton ( ... ) for k, v in ipairs ( table ) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, 1, v[1], false, false ) end addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == btn ) then if ( guiGridListGetSelectedItem ( grid ) ~= -1 ) then local textt = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if ( textt == 'Health1' ) then setElementHealth ( localPlayer, 50 ) elseif ( textt == 'Health2' ) then setElementHealth ( localPlayer, 100 ) end end end end )
  4. انت حاط سترنق المفروض تشيل السترنق لو تلاحض الساينتكس bool givePlayerMoney ( player thePlayer, int amount )
  5. تعلم من الفري روم نفسه افضل
  6. انت قصدك تغير حساب لاعب من اسم تجيبه من ايديت ؟
  7. مايصير تسوي تريقر للكلنت مباشرة اذا استخدمت فنشكن 'onResourceStart' مثال : -- #Server Side : addEventHandler ( "onResourceStart", root, function ( ) for i, v in ipairs ( getElementsByType ( "player" ) ) do triggerClientEvent ( "outtt", v ) end end ) -- #Client Side : addEvent ( "outtt", true ) addEventHandler ( "outtt", root, function ( ) outputChatBox ( "Test" ) end ) بيطلع في الدي بق : ERROR : Server triggered clientside event outtt, but event is not added clientside
  8. كان عنده قوس زائد ماستر جرب : exports["dxmessages"]:outputDx ( plr, "[ " .. i .. " ] " .. getPlayerName ( plrsz [ i ] ), "info" )
  9. بالنسبة لسؤالك الأول تسوي تحقق تجيب في طول الجدول ب # اذا كان عدد الاعبين == 0 او == 1 تسوي return end
  10. وعليكم السلام الفكرة حلوة لكن اتوقع ان القسم غلط
  11. -- #Server Side addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, v in ipairs ( getElementsByType ( "player" ) ) do if ( isGuestAccount ( getPlayerAccount ( v ) ) == false ) then local accName = getAccountName ( getPlayerAccount ( v ) ) if ( isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) ) then setElementData ( v, "Open", true ) end end end end ) addEventHandler ( "onPlayerLogin", root, function ( _, acc ) if ( isObjectInACLGroup ( "user." .. getAccountName ( acc ), aclGetGroup ( "Admin" ) ) ) then setElementData ( source, "Open", true ) end end ) -- #Client Side function ControlSttas() if ( getElementData ( localPlayer, "Open" ) == true ) then guiSetVisible ( Home, not guiGetVisible ( Home ) ) showCursor ( guiGetVisible ( Home ) ) end end addCommandHandler ( "GG", ControlSttas )
  12. استخدم الفنكشنات الي اعطيتك ياها
  13. هو قصده يبي لوحة تفتح مثل لوحة الادمنية لقروب معين
  14. في طريقة حلوة حط حدث لما يسجل الاعب و يدخل السيرفر تحط هذي الفنكشنات isGuestAccount getPlayerAccount getAccountName isObjectInACLGroup aclGetGroup setElementData وفي الكلنت تتاكد انه عنده الداتا وتفتح اللوحة
  15. يمكن على الهواء النقي
  16. addCommandHandler( "عام", function ( plr, cmd, ... ) local text = table.concat ( { ... }, " " ) if not ( text or text == "" ) then return end cancelEvent () local acc = getPlayerAccount(plr) if ChatDisabled then if not isGuestAccount ( acc ) then if not isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then outputChatBox ( "# [ عام ][ نظام الشات ]x الشات مغلق .", plr, 255, 0, 0, true ) cancelEvent () return end else outputChatBox ( "# [ عام ][ نظام الشات ]x الشات مغلق .", plr, 255, 0, 0, true ) cancelEvent () return end end if isGuestAccount ( acc ) then return end local customTag = getAccountData ( acc, "customTag" ) if customTag then local r, g, b = getPlayerNametagColor(plr) outputChatBox(customTag.." " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: "..customTag.." " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Console")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#ff0000* [ #000000Owner#ff0000 ] " .. getPlayerName ( plr ) .. ":#a00000 " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Console ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin - Ex")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#777777* [ Admin - x ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Admin - Ex ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Admin - At")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#777777* [ Admin - At ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Admin - At ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("V.I.P")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#FFcc00* [ V.I.P ] " .. getPlayerName ( plr ) .. ":#ffffff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ V.I.P ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Police")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#6600cc* [ Solider ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Police ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 1")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#FFFF00* [ Level 1 ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Lv.1 ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 2")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#FF6600* [ Level 2 ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Lv.2 ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 3")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#0FC615* [ Level 3 ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Lv.3 ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 4")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#007000* [ Co.Manager Lv.4 ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Lv.4 ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 5")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#FF0000* [ Manager ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Lv.5 ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Level 6")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#CC0000* [ Head.Manager ] " .. getPlayerName ( plr ) .. ":#0099cc " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Lv.6 ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Head.Admin")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( plr ) .. ":#0099cc " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Head.Admin ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Police.Active")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#6600cc* [ #ff0000Solider.Active#6600cc ] " .. getPlayerName ( plr ) .. ":#ffffff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Police.Active ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Trainee")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("#FFFF00* [ Trainee ] " .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT: [ Trainee ] " .. getPlayerName ( plr ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(acc), aclGetGroup("Everyone")) then local r, g, b = getPlayerNametagColor(plr) outputChatBox("" .. getPlayerName ( plr ) .. ":#ffFFff " .. text, root, r, g, b, true ) outputServerLog("CHAT:" .. getPlayerName ( plr ) .. ": " .. text) end end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) for k, v in ipairs ( getElementsByType ( "player" ) ) do unbindKey ( v, "t", "down", "chatbox", "say" ) bindKey ( v, "t", "down", "chatbox", "عام" ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) unbindKey ( source, "t", "down", "chatbox", "say" ) bindKey ( source, "t", "down", "chatbox", "عام" ) end )
  17. كل واحد وطريقته
×
×
  • Create New...