Jump to content

Drakath

Members
  • Posts

    768
  • Joined

  • Last visited

Posts posted by Drakath

  1. Link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14700

    For this resource to work, type this in the console: aclrequest allow AdBlock function.banPlayer

    This resource will ban players who try to advertise other servers. Their message will not show up in the chat but will be logged in the server.log

    Key features:
    IPv4 and IPv6 detection
    Private chat control (/msg)
    Blacklist specific words or server names
    Exclude specific ACL groups
    Custom ban time and ban type
    Settings for each feature

    You can modify ban duration, ban type (IP, serial or both) and enable or disable each feature in the settings.

    To change AdBlock settings, open the Admin Panel -> Resources. Find AdBlock and click the settings button.

    IPv6 detection is disabled by default since MTA does not yet support it, however it might prove useful in the future.

    Admins, Moderators and SuperModerators are allowed to advertise by default, however you can change that in the settings.

    There is an exported function to detect ads: isAdvertisement(string)
    You can use this function if you have any custom chat scripts.

    For example:

    if exports.AdBlock:isAdvertisement(message) then
    -- do something
    end

    JVhWruD.png

    • Like 2
  2. Is there a way to access the data of another class?

    Thing = inherit( Singleton ) 
      
    function Thing:constructor( ) 
        self.myTable = {} 
    end 
         
    addEvent("someEvent", true) 
    function myFunc(something) 
        triggerClientEvent(client, "haha", root, --How do I access myTable[something] ? 
        ) 
    end 
    addEventHandler("someEvent", root, myFunc) 
    

    I know I could do Thing:MyFunc() and then access self.myTable but my question is whether there is an alternative way for this.

  3. I don't even understand anymore. Some say it's clientside, others say it's serverside.

    Is there any real documentation about this?

    @Saml1er I don't put any stuff other than a .map file and when I start it, the download bar appears. I'm pretty sure it downloads the .map file but simply doesn't use cache since it re-downloads it everytime.

    If you don't believe me: http://i.imgur.com/DMSwjbk.jpg

    Is creating objects clientside more efficient then doing it serverside? I guess it puts less stress on the server...

  4. @Saml1er what I was saying was that clientside objects can be seen by everyone because the script is executed for everyone which means, you can't assume that .map is serverside just because everyone sees the object.

    addEventHandler("onClientResourceStart", root, 
    function () 
    createObject ( ... ) --Creates an object when resource starts which means everyone will see this object. 
    end ) 
      
      
    

    Also, can you link me to the wiki page that you are reading? If .map is serverside, why is it downloaded?

    @Simple01 good point but this leaves me to a thought why would MTA devs make it clientside if serverside would not require any download and is basically the same thing.

  5. What I really meant with my question is whether the map resource creates those objects clientside or serverside.

    It creates the objects server sided (for everyone).

    How do you know this? Did you read it somewhere? Objects created clientside are also seen by everyone because the script is executed for everyone.

  6. function bindFire () 
      removeEventHandler("onClientRender", getRootElement(), rotate)  
      addEventHandler("onClientRender", getRootElement(), rotate) 
    end 
    addEvent( "bindFire", true ) 
    addEventHandler( "bindFire", localPlayer, bindFire ) 
    

  7. Yes, unfortunately that is how I'am doing it right now. But the problem is that some of the vehicles are used by the players at the moment of restart, therefore a small delay occurs in-between the restart period, and not to mention that you cannot save vehicle visual damage (or at least I haven't found the function to do so).

    You can.

    setVehicleDoorState 
    getVehicleDoorState 
    setVehiclePanelState 
    getVehiclePanelState 
    

  8. Is isObjectInACLGroup() function resource hungry? Would it be more efficient to make a table of players who are in a specific ACL group instead of calling this function every time? (About 8 times per second)

  9. Is MTA:SA 1.5.1 actually available right now or is it like an early announcement? I still have MTA 1.5 and I did not get any prompt to update and checking for a new version tells me that there isn't one. I haven't seen any 1.5.1 servers either.

  10. What would be more efficient, to trigger an event with lots of arguments like

    triggerServerEvent("myEvent", root, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) 
    

    or to make a table for all those arguments?

    local myTable = {arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10} 
    triggerServerEvent("myEvent", root, myTable) 
    

  11. In getVehicleUpgradeSlotName() function there are 15 upgrade slots but I have never seen some of these upgrade slots on any of the vehicles. Does an upgrade exist to every slot or are some of the slots useless?

    Also, what does the Stereo upgrade do?

×
×
  • Create New...