Jump to content

SycroX

Members
  • Posts

    2,141
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by SycroX

  1. do you change the yourGroupName to the group of acl that you want ? function findPlayer(player) if player and type(player) == "string" then local element = getPlayerFromName(player) if element then return element end local player = string.lower(player) local spl = split(player, string.byte("[")) if spl then player = table.concat(spl, ";") end for k, v in pairs(getElementsByType("player")) do local name = string.lower(getPlayerName(v)) local spl = split(name, string.byte("[")) if spl then name = table.concat(spl, ";") end if string.find(name, player) then element = v break end end if isElement(element) then return element end return false else return false end end addCommandHandler("pm", function(player,_,op,...) local args = {...} if op and args then local account = getPlayerAccount(player) if account and not isGuestAccount(account) then if isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("yourGroupName")) then local otherPlayer = findPlayer(op) if otherPlayer then local text = table.concat(args, " ") outputChatBox("Admin <"..getPlayerName(player).."> : "..text, otherPlayer, 255, 255, 255, true) end end end end end ) ** sorry try the new code i've forget to add otherPlayer to outputChatBox
  2. function findPlayer(player) if player and type(player) == "string" then local element = getPlayerFromName(player) if element then return element end local player = string.lower(player) local spl = split(player, string.byte("[")) if spl then player = table.concat(spl, ";") end for k, v in pairs(getElementsByType("player")) do local name = string.lower(getPlayerName(v)) local spl = split(name, string.byte("[")) if spl then name = table.concat(spl, ";") end if string.find(name, player) then element = v break end end if isElement(element) then return element end return false else return false end end addCommandHandler("pm", function(player,_,op,...) local args = {...} if op and args then local account = getPlayerAccount(player) if account and not isGuestAccount(account) then if isObjectInACLGroup("user."..getAccountName(account), aclGetGroup("yourGroupName")) then local otherPlayer = findPlayer(op) if otherPlayer then local text = table.concat(args, " ") outputChatBox("Admin <"..getPlayerName(player).."> : "..text, 255, 255, 255, true) end end end end end )
  3. do you try to replace the elementData with tables ?
  4. function onPreFunction(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} if functionName == "setPedAnimation" and isElement(args[1]) then if isPedInVehicle(args[1]) then return 'skip' end end end addDebugHook("preFunction", onPreFunction, {"setPedAnimation"})
  5. ما اخدت بالي معلش اعكس مكان true و false
  6. زهقان من المذاكره و القرف بقا فقط افرفش شويه
  7. function aicars() if isWorldSpecialPropertyEnabled("aircars") then outputChatBox ("aircars activated") setWorldSpecialPropertyEnabled("aircars", true) else outputChatBox ("aircars disactivated") setWorldSpecialPropertyEnabled("aircars", false) end end addCommandHandler ("flycar", aicars)
  8. تمام ما انت مسويها وش تبي يعني ؟
  9. انا لو فاضي استحاله اكتب كل ذا موضوعك جدا مفيد و في وقته و الظاهره دي صراحه ما كانت موجوده زمان بس طلعت جديده و يا ريت الكل يصحح من نفسه بس عندي نقطه انا الحين فاكر اول جدال معك اظن ان عشان اختلاف في طريقه الفهم أدي انك تقول انتو ما تفهمو انتم تحفظو فقط , انت شكلك مبرمج جديد و داخل ساخن يعني بلاش نستعمل المفاهيم ذي لانها مو حلوه و تأدي لبداء صراعات بقا و يجي نصور و يطيرنا مخالفات المهم يعني الي ابي اقولو لك ان المفروض نحسن شوي من طريقه كلامنا مع البقيه
  10. SycroX

    Save a memo

    what's the difficult in this ?? addCommandHandler("saveMemo", function() local text = guiGetText(yourMemo) if text and text ~= "" then triggerServerEvent("saveMyMemo", localPlayer, text) end end ) --#server addEvent("saveMyMemo", true) addEventHandler("saveMyMemo", root, function(text) setAccountData(getAccount("Console"), "memo", text) end ) idk if it's possible to use setAccountData on console's account but if it didn't work you can create a specific account for this stuffs
  11. وش الموضه الجديده الي بالمنتدي ذي اي حد يقول شي يحط اخره end end طيب انت حاطت لي و انا هحط لك return
  12. getCursorPosition idk if there's a way to check if the player click on a water or on a ground but you can use this function to bring the cursor's position
  13. he didn't ask for an id system he wants to get the player's name, acl group and id from a command so @MRThinker u have to try to do it by yourself we're here to help u not to make codes for you
  14. SycroX

    Save a memo

    the easiest way is to save it by using setAccountData / getAccountData on Console's account or u can just use mysql if u've some experience in it i don't recommend to use the tables because if u restart the resource all the data in the table will gone ( unless u have some experience in creating files so u can save the table by creating a file and exporting all the data in the table to the file and then when the resource start u can import it again and insert it to the table etc.. )
  15. SycroX

    Antiveh

    u've to learn how to sort the codes local colPositions = { {96.24, 1808.96, 230, 150}, } local createdCols = {} function destroyTheVehicles(player) if getElementType(player) == "player" and isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) removePedFromVehicle(player) respawnVehicle(vehicle) outputChatBox("Vehicles are not allowed here!", player, 255, 0, 0) end end for i, k in pairs(colPositions) do local tCol = createColRectangle(k[1], k[2], k[3], k[4]) -- Creating the col at the position with the fix width and height. addEventHandler("onColShapeHit", tCol, destroyTheVehicles) -- Adding the "onColShapeHit" event to the created col. table.insert(createdCols, tCol) -- Adding the created col to the "createdCols" table. end function cancelEnter(thePlayer) for i, k in pairs(createdCols) do -- Looping through the created cols. if isElementWithinColShape(thePlayer, k) then -- Checking if the player is inside one. destroyElement(source) -- If he is. outputChatBox("Vehicles are not allowed here!", thePlayer, 255, 0, 0) break end end end addEventHandler("onVehicleStartEnter", root, cancelEnter)
  16. ooh boy function giveALLXP(player, _, xp) for _,player in ipairs(getElementsByType("player")) do givePlayerXP(player, tonumber(xp)) end end addCommandHandler ("xpall", giveXP) function giveXP(player, _, to, xp) if to and xp then local p = getPlayerFromName(to) if p then givePlayerXP(p, tonumber(xp)) end end end addCommandHandler("xp", giveXP)
  17. getElementVelocity setElementVelocity
  18. at least try and show us your attempt
  19. الراجل حر يحط العنوان الي يباه ما في قانون بالمنتدي يقول لازم عناوين المواضيع تكون مثل العناوين الي مسويها مستر كور الموضوع ذا رجاء من مستر كور مو قانون لازم نلتزم بيه فلا تقعد تخرب مواضيع الكل
×
×
  • Create New...