Jump to content

Drakath

Members
  • Posts

    768
  • Joined

  • Last visited

Everything 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
  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)
  16. Drakath

    About MTA:SA 1.5.1

    I see, thanks for the info
  17. Drakath

    About MTA:SA 1.5.1

    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.
  18. 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)
  19. Is there a way to check if the element was created by a specific resource?
  20. To be more specific, is there a vehicle that has either headlights or misc upgrade?
  21. 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?
  22. Seems like the problem stopped after I disabled my custom downloads script. I'm still not sure how could it cause something like this...
  23. That's not the problem. Notice the Microsoft Windows not responding messages boxes.
  24. What I really want know is how is it possible for this program to mess up my computer like this even after its process has already been terminated?: http://i.imgur.com/0Z3ARZV.jpg
×
×
  • Create New...