Jump to content

Snakegold

Members
  • Posts

    130
  • Joined

  • Last visited

Everything posted by Snakegold

  1. hello community i want when i type /warpto "playername" i go near him, even if i'm in vehicle i tried this code function warpto (thePlayer, playername) if (isElement( thePlayer )) then local player = getPlayerFromNamePart(playername or "") local name = getPlayerName(thePlayer) if player then getElementPosition ( source, posX, posY, posZ ) if isPedInVehicle (source) then setElementPosition (source, posX, posY, posZ) outputChatBox("You have been warped to "..getPlayerName(player).."",thePlayer, 0, 255, 0) else outputChatBox("Couldn't find the player",thePlayer, 255, 0, 0) end end end end addCommandHandler ( "warpto", warpto )
  2. شباب بسوي لوحة لو اللاعب الموجود بالجدول يدخل السيرفر يصير Statu = Online لو يطلع يصير Statu = Offline GUIEditor = { gridlist = {}, window = {}, label = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 760) / 2, (screenH - 294) / 2, 760, 294, "Online staffs", false) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 741, 237, false, GUIEditor.window[1]) guiSetVisible (GUIEditor.window[1],false) guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Rank", 0.3) guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.3) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Micheal", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "Admin", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 3, "Online", false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], 0, 3, 0, 255, 0, 255) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Jhon", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "Admin", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 3, "Offline", false, false) guiGridListSetItemColor(GUIEditor.gridlist[1], 1, 3, 255, 0, 0, 255) GUIEditor.label[1] = guiCreateLabel(10, 260, 740, 29, "Press \" F5 \" to close this panel", false, GUIEditor.window[1]) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") function Open () guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(guiGetVisible(GUIEditor.window[1])) end bindKey("F5","down", Open) Server: local staffs = { "Jhon", "Micheal", } function onStaffJoin () --- ايش اضيف هنا ؟ addEventHandler ( "onPlayerJoin", getRootElement(), onStaffJoin ) function onStaffQuit () -- إيش اضيف هنا؟ addEventHandler ( "onPlayerQuit", root, quitPlayer )
  3. شباب ليش ماقدر اشغل المابات في فيم مود الريس مابات محملهم من هذا الموقع http://why-pay-for-maps.blogspot.com/2012/06/mta-maps-download.html
  4. debug error: ERROR: mapmanager/mapmanager_exports.lua:68: mapmanager: Map 'map' is not compatible with 'race' نفس المشكل
  5. شباب ليش ماقدر اشغل مابات في جيممود الريس؟ مابات حملتهم بس ماقدر اشغلهم
  6. Snakegold

    Race

    شباب كيف أخلي مابات الريس تشتغل لحالها يعني ينتهي ماب يشتغل ماب لي بعده
  7. function shout ( player, cmd, ... ) local message = table.concat ( { ... }," " ) local screenW, screenH = guiGetScreenSize() for _, thePlayer in ipairs ( getElementsByType ( "player" ) ) do addEventHandler("onClientRender", root, shout) dxDrawText(""..getPlayerName(player).." "..message.."", (screenW - 766) / 2, (screenH - 635) / 2, ((screenW - 766) / 2) + 766, ( (screenH - 635) / 2) + 635, tocolor(255, 0, 0, 255), 2.00, "bankgothic", "center", "top", false, true, false, false, false) triggerServerEvent ( playerSource, "dxDrawText", player ) end setTimer ( function ( ) removeEventHandler("onClientRender", root, shout) end ,10000, 1 ) end addCommandHandler ( "shoutall", shout ) سويت هيك و ما اشتغل
  8. بدي لما اكتب /shoutall بتطلع رسالة على جميع اللاعبين سويت هذا الكود و ماقدر ازبطه Client: function shout ( player, cmd, ... ) local message = table.concat ( { ... }," " ) local screenW, screenH = guiGetScreenSize() for _, thePlayer in ipairs ( getElementsByType ( "player" ) ) do textDisplayAddObserver ( textDisplay, thePlayer ) dxDrawText(""..getPlayerName(player).." \n"..message.."", (screenW - 766) / 2, (screenH - 635) / 2, ((screenW - 766) / 2) + 766, ( (screenH - 635) / 2) + 635, tocolor(255, 0, 0, 255), 2.00, "bankgothic", "center", "top", false, true, false, false, false) triggerClientEvent ( playerSource, "dxDrawText", player ) end setTimer ( function ( ) textDestroyTextItem ( textItem ) textDestroyDisplay ( textDisplay ) end ,10000, 1 ) end addCommandHandler ( "shoutall", shout ) Server: function shout ( player, cmd, ... ) local accountname = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then local message = table.concat ( { ... }," " ) outputChatBox("#ff0000(#FF0040Shoutall#ff0000)"..getPlayerName(player)..": #ffffff"..message.."", root, 255, 0, 0, true) else outputChatBox ( "You cannot use this command!", player, 255, 12, 15 ) end end addEvent( "dxDrawText", true ) addCommandHandler ( "shoutall", shout )
  9. شباب بدي لما اقتل شخص ينكتب رسالة في شاشة function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( killer ) then end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) function drawtext ( killer ) dxDrawText("+1,000 $", 941, 325, 1145, 368, tocolor(22, 191, 14, 255), 1.20, killer, "bankgothic", "left", "top", false, false, false, false, false) end addEventHandler ("onClientRender", drawtect) مو شغال ممكن تقلي وين الخطأ او ايش مسويه خطأ؟
  10. Snakegold

    gui

    #DRAGON!FIRE@ مشكور شغال
  11. ممكن شرح للكود أسف على الإزعاج
  12. Snakegold

    gui

    طيب ايش المشكلة؟ Client-- GUIEditor = { gridlist = {} } local screenW, screenH = guiGetScreenSize() wind = guiCreateWindow((screenW - 315) / 2, (screenH - 375) / 2, 315, 375, "Online staffs", false) guiWindowSetSizable(wind, false) guiSetVisible(wind, false) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 296, 292, false, wind) guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "Rank", 0.5) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Online Player", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "Admin", false, false) close_btn = guiCreateButton(113, 325, 87, 31, "Close", false, wind) function Open () guiSetVisible(wind, not guiGetVisible(wind)) showCursor(guiGetVisible(wind)) end bindKey("F5","down", Open) addEventHandler("onClientGUIClick",root, function() if source == close_btn then guiSetVisible(wind,false) showCursor(false) end end) -- functions addEvent("client:getOnlineAdmins:callBack",true) addEventHandler("client:getOnlineAdmins:callBack",root, function(admins) outputChatBox(#admins) for k,v in ipairs(admins) do local row = guiGridListAddRow(lp.gridlist) guiGridListSetItemText(lp.gridlist,row,1,v.name,false,false) guiGridListSetItemColor(lp.gridlist,row,1,0,255,0) guiGridListSetItemText(lp.gridlist,row,2,v.rank,false,false) guiGridListSetItemColor(lp.gridlist,row,2,0,255,0) end end triggerServerEvent("server:getOnlineAdmins",localPlayer) Server-- local admins = { "Admin", "Moderator", } addEvent("server:getOnlineAdmins",true) addEventHandler("server:getOnlineAdmins",root, function() local a = {} for k,group in ipairs(admins) do for k,v in ipairs(aclGroupListObjects(aclGetGroup(group))) do if v:find("user.") then local player = getAccountPlayer(getAccount(v:gsub("user.",""),nil)) if player then table.insert(a,{name=getPlayerName(player):gsub("#%x%x%x%x%x%x",""),rank=group}) end end end end triggerClientEvent(client,"client:getOnlineAdmins:callBack",client,a) end )
  13. Hello community i wan't to disable using animations while driving how ?? i tried this code function restricanim (thePlayer) if ( isPedInVehicle (thePlayer) ) then cancelEvent() outputChatBox ("You can't use animations while driving", 255,0,0) end end addCommandHandler ( "animation", restricanim ) addEventHandler( "OnPlayerVehicleEnter", root, restricanim ) i changed alot but nothing happened
  14. Snakegold

    gui

    شباب راح اسوي لوحة فيها أسماء الأدمنية لو في أدمن موجود حاليا بالسيرفر يكون اسمه بالأضر و لو هو روح أوفلااين بيصير إسمه بالأحمر المطلوب ايش لازم استعمل؟ Functions/Events GUIEditor = { gridlist = {} } local screenW, screenH = guiGetScreenSize() wind = guiCreateWindow((screenW - 315) / 2, (screenH - 375) / 2, 315, 375, "Online staffs", false) guiWindowSetSizable(wind, false) guiSetVisible(wind, false) GUIEditor.gridlist[1] = guiCreateGridList(9, 23, 296, 292, false, wind) guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "Rank", 0.5) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Online Player", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "Admin", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Offline Player", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "Moderator", false, false) close_btn = guiCreateButton(113, 325, 87, 31, "Close", false, wind) function Open () guiSetVisible(wind, not guiGetVisible(wind)) showCursor(guiGetVisible(wind)) end bindKey("F5","down", Open) addEventHandler("onClientGUIClick",root, function() if source == close_btn then guiSetVisible(wind,false) showCursor(false) end end)
  15. بكل المودات لازم تكون False قبل True زي هيك outputChatBox ("aircars disactivated") setWorldSpecialPropertyEnabled("aircars", false) else outputChatBox ("aircars activated") setWorldSpecialPropertyEnabled("aircars", true) ??
  16. الكود لحس مخي كيف Aircars desactivated Value: true و Activated Value: false ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ PS: المود شغال
  17. السلام عليكم شباب ممكن حد يقلي متى استعمل ترايقر و كيف و ايش هو اصلا
  18. Trigger? ماعرف استعمله و ما اعرف ايش يعني
  19. كودك مو شغال function aircaron () setWorldSpecialPropertyEnabled("aircars", true) outputChatBox ("aircars activated",0 ,255 ,0) end addCommandHandler ("flycaron", aircaron) function aircaroff () setWorldSpecialPropertyEnabled("aircars", false) outputChatBox ("aircars disactivated",255 ,0 ,0) end addCommandHandler ("flycaroff", aircaroff) خلاص صلحته بس بدي اخليها بس للادمن function aircaron (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- Does he have access to Admin functions? outputChatBox( "Acces denied", thePlayer, 255, 255, 0) end end addCommandHandler( "flycaron", root, aircar ) في خطأ؟؟
  20. why i cant see the player color when i pm him function thePM(thePlayer,commandName,sendToName,...) local pmWords = { ... } local pmMessage = table.concat( pmWords, " " ) if sendToName then if getPlayerFromNamePart2(sendToName) then local toPlayer = getPlayerFromNamePart2(sendToName) local r,g,b = getPlayerNametagColor (toPlayer) if not (toPlayer == thePlayer) then --that () needed if not (pmMessage == "") then outputChatBox("#FC3986(Whisper) to " .. getPlayerName(toPlayer) .. ":#ffffff " .. pmMessage, thePlayer, r, g, b, true) Part of my script
  21. مشككور هذا الفنكشن لي كنت ابحث عليه onClientVehicleCollision
  22. مو شغالة بدي لما اسوي /flycar السيارة تصير تطير و لاما اكتب الكوماند مرة ثاينة الفنكشن يوقف
×
×
  • Create New...