Jump to content

tuaos

Members
  • Posts

    83
  • Joined

  • Last visited

Posts posted by tuaos

  1. It was some great time i had spend in MTA since early 2011, played in several servers most of freeroams, favourited (Spykes Freeroam) which was really a great server in 2011s. Lately got intrest in scripting from 2014s and joined the forum to guide myself and share what i learned.. and yea it was fun.

    MTA took me off from being boredom most of the time ( emotional 8) ).

    So being too old for this in either ways, i am quitting and i know that no one cares.

    This matter is to thank all MTA Developers & Team for their magnificent work that had me a really great time AND wish you all more success in your future development.

    Sorry for my bad english.

    Peace Out Bros.

    Good Bye and have a Wonderful New Year :)

  2. This is server-sided! So = server.lua. And This does not work if you change skin with freeroam resource!

    If freeroam, then you have to edit inside that!

      
    function skinTeam(oldModel, newModel) 
    local players = getElementsByType ( "player" ) 
    for i,thePlayer in ipairs(players) do 
        if newModel == 18 then 
        if not isPlayerInTeam(thePlayer, "Admin") then 
            cancelEvent() 
        end 
        end 
    end 
    end 
    addEventHandler("onElementModelChange", root, skinTeam) 
      
    function isPlayerInTeam(player, team) 
        assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") 
        assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]") 
        return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true))) 
    end 
    

    Meta.xml

       "Skin mod for a group" author="S3Nn4oX" version="1.0.0" type="script" /> 
       

  3. How is the VIP set to a player in your "vip" resource!

    If it is by SQL then, obtain players which is vip by:

    executeSQLQuery 
    

    Or if it is set in account then:

    getAccountData 
    

    Else if you have a team for VIP then its easy with:

    isPlayerInTeam 
    

  4. Of course I did understand that, I know can be used when its a zip file a located at resources. But I extracted the client & server lua scripts which are located on this ==server > mods > deathmatch > resources > RPG (meta.xml located here) > LoginSystem (client & server scripts here). There, what im just trying to say is how can i add the accountaccess If its not located on the resources file.

    But thanks anyway for your comments :)

    Its just that I want all the scripts on my Folder so that i`ll just start all scripts with just 1 command. /start RPG

    But I now used the resource.login_panel :)

    resource.RPG 
    

  5. this code I'm working on three days ... I am new to it even more scripts so it does not show the GUI

    I replaced Bope with admin group.. and it works...

    local gate = createObject( 980, 1541.0999755859, -1627.6999511719, 15.199999809265, 0, 0, 90 ) 
    local marker = createMarker(1541.49, -1627.82, 13.38, "cylinder", 10, 255, 255, 255, 0) 
    local marker2 = createMarker(1541.49, -1627.82, 13.38, "cylinder", 10, 255, 255, 255, 0) 
      
    function moveGate(psource) 
    local Deadusergroup = getAccountName(getPlayerAccount(psource)) 
    if isObjectInACLGroup("user."..Deadusergroup, aclGetGroup("Admin")) then 
    moveObject(gate, 980, 1541.0999755859, -1627.6999511719, 9) 
    setTimer(moveBack, 5000, 1) 
    else 
    triggerClientEvent(psource, "senhadabase", psource) 
    end 
    end 
    addEventHandler("onMarkerHit", marker, moveGate) 
    function moveBack() 
    moveObject(gate, 980, 1541.0999755859, -1627.6999511719, 15.199999809265) 
    end 
      
    

    So, the problem is either you didn't create group in acl for "Bope"

  6. client :
    GUIEditor = { 
        button = {} 
    } 
      
      
    function GUI() 
        GUIEditor.button[1] = guiCreateButton(231, 240, 143, 65, "onsound", false) 
        GUIEditor.button[2] = guiCreateButton(390, 241, 143, 65, "offsound", false) 
    end 
      
    local sx,sy = guiGetScreenSize() 
      
    function Dx() 
        dxDrawRectangle(sx*0.3413,sy*0.3550,sx*0.3137,sy*0.2667) 
        dxDrawLine(222 - 1, 164 - 1, 222 - 1, 376, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(545, 164 - 1, 222 - 1, 164 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(222 - 1, 376, 545, 376, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(545, 376, 545, 164 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(222, 164, 323, 212, tocolor(10, 244, 231, 171), false) 
        dxDrawLine(232 - 1, 240 - 1, 232 - 1, 306, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(373, 240 - 1, 232 - 1, 240 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(232 - 1, 306, 373, 306, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(373, 306, 373, 240 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(232, 240, 141, 66, tocolor(10, 244, 231, 171), false) 
        dxDrawLine(391 - 1, 240 - 1, 391 - 1, 306, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(532, 240 - 1, 391 - 1, 240 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(391 - 1, 306, 532, 306, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(532, 306, 532, 240 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(391, 240, 141, 66, tocolor(10, 244, 231, 171), false) 
        dxDrawText("αυ∂ισ ρℓαувα¢к", 230, 239, 373, 305, tocolor(120, 11, 242, 171), 1.00, "default-bold", "center", "center", false, false, false, false, false) 
        dxDrawText("Extinguish sound", 390, 239, 531, 307, tocolor(247, 39, 5, 171), 1.00, "default-bold", "center", "center", false, false, false, false, false) 
        dxDrawLine(220, 207, 543, 208, tocolor(255, 255, 255, 255), 1, false) 
        dxDrawText("To play the sound Put option on αυ∂ισ ρℓαувα¢к", 222, 164, 546, 185, tocolor(144, 233, 18, 171), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("To reduce the sound Put Option Extinguish sound", 223, 185, 547, 206, tocolor(247, 39, 5, 171), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawLine(223 - 1, 339 - 1, 223 - 1, 375, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(545, 339 - 1, 223 - 1, 339 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(223 - 1, 375, 545, 375, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(545, 375, 545, 339 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(223, 339, 322, 36, tocolor(144, 233, 18, 171), false) 
        dxDrawText("Mod Sound By ~ Mr.Hassan", 222, 337, 544, 375, tocolor(19, 14, 236, 171), 1.00, "pricedown", "left", "top", false, false, false, false, false) 
    end 
    ------------------------------------- 
    addEventHandler ( "onClientGUIClick", root, 
    function (  ) 
        if source == GUIEditor.button[1] then 
            setSoundPaused(theSound, true) 
        elseif source == GUIEditor.button[2] then 
            setSoundPaused(theSound, false) 
        end 
    end 
    )   
    ------------------------------   
    local opened = false 
      
    function toggleWindow() 
        if opened == false  then 
            opened = true 
            addEventHandler("onClientRender",root,Dx) 
            showCursor(true) 
            guiSetAlpha(GUIEditor.button[1], 1) 
            guiSetAlpha(GUIEditor.button[2], 1) 
        else 
            opened = false 
            removeEventHandler("onClientRender",root,Dx) 
            showCursor(false) 
            guiSetAlpha(GUIEditor.button[1], 0) 
            guiSetAlpha(GUIEditor.button[2], 0) 
        end 
    end 
    bindKey ("F4","down",toggleWindow) 
    

    and

    meta :

     

    and And also the same problem

    Okay, replace your meta with this.. Lol :idea:

     

  7. Hello dear MTA TEAM i am here to tell you guys about the Hunter exploiding bug. After the last update of MTA:SA we can see in many server's that if we take hunter, and shoot 5-6 missiles it explodes itself. It isn't a problem with 1 server but its happening in many server's. So kindly see to this kind of epic bug.

    Hope you guys fix it soon.

    Regards

    ~RuDrAnSh

    +1

  8. then you have to mention the location on lua too. (ZombieRPG)Weapons/weapons/ak47.txd,(ZombieRPG)Weapons/weapons/ak47.dff

    function replaceWeapon() 
        local txd = engineLoadTXD("(ZombieRPG)Weapons/weapons/ak47.txd", true) 
        engineImportTXD(txd, 355) 
        local dff = engineLoadDFF("(ZombieRPG)Weapons/weapons/ak47.dff") 
        engineReplaceModel(dff, 355) 
    end 
    addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon) 
      
    

    Meta.xml

    
    

    put that lua where meta.xml is located

  9. --Client lua
    function replaceWeapon() 
        local txd = engineLoadTXD("weapons/ak47.txd", true) 
        engineImportTXD(txd, 355) 
        local dff = engineLoadDFF("weapons/ak47.dff", 355) 
        engineReplaceModel(dff, 355) 
    end 
    addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon) 
    

    Meta.xml

    
    

    No error in debug but it seems it keeps on the original texture of it.

    function replaceWeapon() 
        local txd = engineLoadTXD("weapons/ak47.txd", true) 
        engineImportTXD(txd, 355) 
        local dff = engineLoadDFF("weapons/ak47.dff") 
        engineReplaceModel(dff, 355) 
    end 
    addEventHandler("onClientResourceStart", resourceRoot, replaceWeapon) 
    

    Meta.xml

    
    

×
×
  • Create New...