Jump to content


  • Posts

  • Joined

  • Last visited

1 Follower

About Drakath

  • Birthday October 6


  • Location

Recent Profile Visitors

1,620 profile views

Drakath's Achievements


Homie (32/54)



  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
  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. If I add an event handler to a GUI element and later destroy that GUI element, does the event handler automatically get destroyed as well? Does it count as a child of that element?
  4. This is pretty cool. Good job!
  5. 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...
  6. If you start a map, you can see a download bar saying that the map is downloading. Why is that?
  7. @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.
  8. 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.
  9. What I really meant with my question is whether the map resource creates those objects clientside or serverside.
  10. Are the objects created in the .map file equivalent to serverside createObject or clientside createObject?
  11. function bindFire () removeEventHandler("onClientRender", getRootElement(), rotate) addEventHandler("onClientRender", getRootElement(), rotate) end addEvent( "bindFire", true ) addEventHandler( "bindFire", localPlayer, bindFire )
  12. He can't use this because there is no way to get the radio channel as an element. Use setRadioChannel(0) to turn off the radio.
  13. math.rad(ang); -East math.rad(90 - ang); -North math.rad(180 - ang); -West math.rad(270 - ang); -South Simple as that.
  14. You can. setVehicleDoorState getVehicleDoorState setVehiclePanelState getVehiclePanelState
  15. 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)
  • Create New...