Jump to content

Sora

Members
  • Posts

    698
  • Joined

  • Last visited

Everything posted by Sora

  1. \n only works with notepad or scite but not with ms-notepad because the file opened using ms-notepad by default and it shows me first linesecond line in notepad++ or scite ( lua editors ) first line second line thanks Solidsnake(castillo)
  2. \n work is new line ? i didn't know that , thanks ^^
  3. hi , while i'm using fileWrite , i tried to go to the next line using fileSetPos(file,fileGetPos(file)+110) but it just makes some spaces , how can i go to the next line ? i want to do something like local file = fileCreate("file.txt") fileWrite(file,"first line") goToNextLine(file) fileWrite(file,"second line") fileClose(file) file.txt first line second line
  4. Sora

    Acl events ^^

    i didn't meant this .. look for example , if someone tried to use the function aclGroupAddObject it will never tirgger the event above ^ he must use somethng like exports.resourcename: aclGroupAddObject(...) the event would be global if it was defined by mta so i can use something like addEventHandler("onAclGroupAddObject",root, function () if something() then cancelEvent() end end) or something like addEventHandler("onAclGroupAddObject",root, function (group,object) outputServerLog("Object "..obejct.." added to "..group.." by "..getPlayerName(source) or getResourceName(source).." ") end)
  5. Sora

    Acl events ^^

    do you mean something like this? : addEvent("onAclGroupAddObject") addEventHandler("onAclGroupAddObject",root, function (str1,str2) if str1 and str2 then aclGroupAddObject(aclGetGroup(tostring(str1)),tostring(str2)) return true else return false end end) addCommandHandler("acladdobject", function (player,cmd,group,object) if group and object then triggerEvent("onAclGroupAddObject",player,group,object) outputChatBox("* Object "..object.." successfully added to "..group.." ",player,0,255,0) else outputChatBox("* Syntax Error , type /acladdobject ",player,255,0,0) outputChatBox("* Object name can be user.example or resource.example ",player,255,255,0) end end) still if someone used the function aclGroupAddObject , he'll never trigger this event .. and even if i've overwrite the function it will never be global so will never be handled .. that's why i've requested those events to be added
  6. Sora

    Acl events ^^

    MTA team is going to release the new version anyways .. it's depends on votes and of course on mta team opinion
  7. Sora

    Acl events ^^

    i make it whenever i want to .. , your reply isn't belong to here so stop bothering me :\
  8. Sora

    Acl events ^^

    eAi , you're right i wanted this for admin tools for server's security this will help me to protect my own server w1w#ALBANDER, how funny you're , i can make my new version of this script without those events , i just can use wiki functions which are already exist .. thanks everybody for voting , i hope those events will be added
  9. Sora

    Acl events ^^

    thanks , those events would be really useful
  10. Sora

    Acl events ^^

    hey ^^ i'm thinking of acl events like onAclModifyObject onAclGroupAddObject onAclGroupRemoveObject onAclGroupAddAcl onAclGroupRemoveAcl onAclCreateGroup onAclDestroyGroup onAclCreate onAclDestroy onAclSetRight events like this would be really useful , don't you agree with me ? with those events i can know every annoying thing and can handle it easily ^.^
  11. صنع ماركر https://wiki.multitheftauto.com/wiki/CreateMarker الحدث عند لمس الماركر https://wiki.multitheftauto.com/wiki/OnMarkerHit معرفه نوع العنصر https://wiki.multitheftauto.com/wiki/GetElementType صنع سياره https://wiki.multitheftauto.com/wiki/CreateVehicle نقل اللاعب إلى السياره https://wiki.multitheftauto.com/wiki/WarpPedIntoVehicle الكتابه بالشات https://wiki.multitheftauto.com/wiki/OutputChatBox تغيير لون السياره https://wiki.multitheftauto.com/wiki/SetVehicleColor مثال .. vehicleM = createMarker(...) -- اكمل الكود بنفسك colorM = createMarker(...) -- اكمل الكود بنفسك addEventHandler("onMarkerHit",root, function (hitElement) if source == vehicleM and getElementType(hitElement) == "player" then local x,y,z = getElementPosition(hitElement) local vehicle = createVehicle(...) -- اكمل الكود بنفسك warpPedIntoVehicle(hitElement,vehicle) outputChatBox(...) -- اكمل الكود بنفسك elseif source == colorM and getElementByType(hitElement) == "vehicle" then setVehicleColor(hitElement,math.random(255),math.random(255),math.random(255)) local player = getVehicleController(hitElement) outputChatBox(...) -- اكمل الكود بنفسك end end) آسف نسيت شيء تم التعديل ..
  12. Sora

    AUTO TEAMS

    Donators = createTeam ( "Donators", 255, 255, 0 ) Moderators = createTeam ( "Moderators", 0, 255, 0 ) SuperModerators = createTeam ( "SuperModerators", 0, 255, 255 ) Admins = createTeam ( "Admins", 255, 0, 0 ) addEventHandler("onPlayerLogin",root, function () if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then setPlayerTeam(source, Moderators or getTeamFromName("Moderators")) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerators")) then setPlayerTeam(source, SuperModerators or getTeamFromName("SuperModerators")) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, Admins or getTeamFromName("Admins")) elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Donators")) then setPlayerTeam(source, Donators or getTeamFromName("Donators")) end end ) not tested
  13. لا مو حقي .. اتوقع ان castillo مسويه بموضوع من المواضيع viewtopic.php?f=91&t=36423&p=375064&hilit=unban#p375035
  14. local serials = { ["سريالك1"] = true, ["سريالك2"] = true, } function autounban() for i,p in ipairs(getElementsByType("player")) do local Ser = getPlayerSerial(p) if serials[Ser] then thisIP = getPlayerIP(p) end end for index, ban in pairs(getBans()) do local serial = getBanSerial(ban) local ip = getBanIP(ban) if serials[serial] or ip == thisIP then local bannedPlayer = getPlayerFromName(getBanAdmin(ban)) removeBan(ban,root) banPlayer (bannedPlayer,false,false,true,root) end end end setTimer(autounban,5000,0)
  15. اما فجرت القسم هذي قويه خخخخخخخخـ منور الموضوع
  16. Sora

    Money (race)

    go to race folder then go to modes folder Path would be like this : \mods\deathmatch\resources\[gamemodes]\[race]\race\modes open file called : destructionderby.lua using any lua editor ( notepad++ or any other editor ) search for this line : showMessage(getPlayerName(activePlayers[1]) .. ' is the final survivor!', 0, 255, 0) type below it : local randomMoney = math.random(300,500) -- you can change the amount of money , i've set it random between 300 and 500 , no less than 300 and no more than 500 givePlayerMoney(activePlayers[1],randomMoney)
  17. بالامسِ كنتَ تسألُ مُبرمِجاً واليوم غدوتَ مُبرمِجاً أنا لا أُشكك في قدرآتك ولكن إتق الله فيما تفعل
×
×
  • Create New...