Jump to content

Zango

Discord Moderators
  • Posts

    681
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zango

  1. yeah I think it ships with the installation DVD, even if someone got a pirated copy of OSX it's usually a copy of the whole DVD .
  2. A variable is even a term used in basic maths at primary school It stores a value under a name given. ie. a = 2 b = 4 c = a + b d = "hello" e = a you can store everything under variables, elements, object, tables, etc. to toggle something, 50p described it pretty well. You need to set a variable to true when toggled, and perform the opposite when it's true and set it to false. for example: toggle = false function toggleTest() if not toggle == false then outputChatBox ("Toggled off.") toggle = false else toggle = true outputChatBox ("Toggled on.") end end addCommandHandler("toggle", toggleTest)
  3. I don't understand the logic here, you check if a dude is in a vehicle on vehicle exit? It's like checking if your pet is floating in your bathtub while you're holding it
  4. When you install visual mods you probably use a tool like SAMI. Unfortunately popular mods are usually accompanied by a handling edit, and since SAMI automatically installs them, you'd either learn to replace textures in gta3.img yourself, or replace the data files varez posted above everytime you install a new mod.
  5. I would strongly advise you to stop copying other's clientside scripts, posting here and expecting us to fix it. Instead, you should start learning yourself. event handler and the added command is attached to a non existing function, there are no GUI made, but I don't know if you cut out that part on purpose.
  6. Element data is existing, globally, for as long as the element exists, I think. This validates your question, yes element data can be set and retrieved cross resource.
  7. Zango

    Scripting Help!

    There is no specific function that retrieves a players country, the nearest you get is the IP. I think you need to deepen out your question a bit instead of concluding that it wont help you.
  8. Zango

    Scripting Help!

    I think he's wanting advise on how to do so. Having a look at how the admin resource pulled this off, I found this: --[[********************************** * * Multi Theft Auto - Admin Panel * * admin_ip2c.lua * * Original File by lil_Toady * **************************************]] aCountries = {} function getPlayerCountry ( player ) local ip = getPlayerIP ( player ) local ip_group = tonumber ( gettok ( ip, 1, 46 ) ) local ip_code = ( gettok ( ip, 1, 46 ) * 16777216 ) + ( gettok ( ip, 2, 46 ) * 65536 ) + ( gettok ( ip, 3, 46 ) * 256 ) + ( gettok ( ip, 4, 46 ) ) if ( not aCountries[ip_group] ) then loadIPGroup ( ip_group ) end for id, group in ipairs ( aCountries[ip_group] ) do if ( ( group.rstart <= ip_code ) and ( ip_code <= group.rend ) ) then return group.rcountry end end return false end function loadIPGroup ( group ) aCountries[group] = {} local node = xmlLoadFile ( "conf/ip2c/"..group..".xml" ) if ( node ) then local ranges = 0 while ( true ) do local range_node = xmlFindChild ( node, "range", ranges ) if ( not range_node ) then break end local rstart = tonumber ( xmlNodeGetAttribute ( range_node, "start" ) ) local rend = tonumber ( xmlNodeGetAttribute ( range_node, "end" ) ) local rcountry = xmlNodeGetAttribute ( range_node, "country" ) local count = #aCountries[group] + 1 aCountries[group][count] = {} aCountries[group][count].rstart = rstart aCountries[group][count].rend = rend aCountries[group][count].rcountry = rcountry ranges = ranges + 1 end xmlUnloadFile ( node ) end end In other words, put this code in the admin resource serverside file, and it should work fine. You'd have to convert this to serverside code too. onClientPlayerJoin is onPlayerJoin, for example.
  9. functionWithTimerInIt() Isn't valid, you have to separate function with the name. You declare a function 'WithTimerInIt' but when you do not separate those, how is LUA supposed to know you do so. function WithTimerInIt()
  10. addEventHandler("onMarkerHit", getRootElement(), function(element) if getElementType(element) == "player" then setTimer ( drainSomeWater, 100, 15000 ) end end ) Is the same as function functionName (element) if getElementType(element) == "player" then setTimer ( drainSomeWater, 100, 15000 ) end end addEventHandler("onMarkerHit", getRootElement(), markerHit) but it's just an alternative way to put it.
  11. Zango

    3 Qeustions..

    1) Create a Colshape a bit behind the object. For example if you want to move a gate, you'd create a Colshape behind it and use the event onElementColShapeHit, and move the gate. 2) Not so sure, but I think you can import the pickup image (should be in race resource), place it where you want, create a Colshape around it and trigger a function to teleport. There might be some other, more generic answer to this. 3) setPedCanBeKnockedOffBike
  12. I think you need a function for that. addEventHandler("onMarkerHit", getRootElement(), function(element) [b]if getElementType(element) == "player" then[/b] setTimer ( drainSomeWater, 100, 15000 ) end end )
  13. You might consider my review here to be in sole intention to insult another MTA host, however our experience with serverFFS the last three months has been very unsatisfying. The hole staff at DKR and it's regular guests can approve the below. Around May our server started showing increased pings and a new type of lag. Due to us constantly developing we were aware of the fact, that this might have been our own problem. The problem remained unsolved throughout June/July where we were at peaks of 128 players for several hours. In early August, our server started crashing and crashing and crashing and crashing. Sometimes our server would stay down for 10 minutes, other times 6 hours, other times it would be running but inaccessible. Around the 15th August I think, serverFFS had a major breakdown where all services including their own website went down. This didn't change anything and our server kept crashing and lagging all the way through August, until now in September, where serverFFS had a maintenance period and we have our stability back. This maintenance caused us to loose a lot of data, including users and racetimes leaving our server somewhat broken because we store a lot of information in the databases. Our data hasn't been recovered, however one of our administrators had a backup from the 1st of August. This has been a very unprofessional hosting period with serverFFS, our server has lost ~ 15% of it's average player count and we have been overtaken the number one spot amongst servers. We have now moved into a dedicated server. It's got a dual core AMD processor, 1 gigabyte RAM and 5 terabyte bandwidth for exactly the same price we spent at serverFFS for a 128 slots server. We have no problems with this dedicated server, our mta-server has been running for weeks without crashing once.
  14. I must ask, are you sure the resource which your register/login code is in, is called 'login' and not something else?
  15. Zango

    Small problem

    Vehicles created clientside can't be driven, because of sync issues. Instead turn this serverside or trigger a server event.
  16. unless your group 'Everyone' has permissions to addAccount it wont work. Instead, do this: <group name="Admin"> <acl name="Moderator" /> <acl name="SuperModerator" /> <acl name="Admin" /> <acl name="RPC" /> <object name="resource.admin" /> <object name="resource.webadmin" /> <object name="resource.login" /> </group>
  17. try this, addEventHandler("onPlayerWasted", getRootElement(), function(ammo, killer) if getElementType(killer) == "player" then outputChatBox(getPlayerName(killer).." has just killed you!", source, 0, 255, 0) end end ) Yeah syntax was knackered, outputChatBox(getPlayerName(killer[b]))..[/b]" has just killed you!", source, 0, 255, 0) should be: outputChatBox(getPlayerName(killer[b]).[/b]." has just killed you!", source, 0, 255, 0) as said above, I apologise. And as varez mentioned, this isn't a gamemode, just run this serverside script along with freeroam for example. meta.xml if you were in doubt: <meta> <script src="server.lua" /> </meta>
  18. https://wiki.multitheftauto.com/wiki/OutputChatBox outputChatBox ( string text [, element visibleTo=getRootElement(), [b]int r=255, int g=255, int b=255[/b], bool colorCoded=false ] ) These last optional highlighted arguments can specify what colour the message should be in, defined in RGB (Red Green Blue). 255 0 0 0 255 0 0 0 255 255 is the max value, you mix these to produce different colours.
  19. Yes that will output to all players, because you haven't specified anything else and it's by default the root element. So we can carry out your example: addEventHandler("onPlayerWasted", getRootElement(), function(ammo, killer) if getElementType(killer) == "player" then outputChatBox(getPlayerName(killer)).." has just killed you!", source, 0, 255, 0) end end )
  20. http://home.deds.nl/~aeron/files/ In future try the wiki searching for "MTA:mA" and go to the links at bottom.
  21. There's a critical syntax error in your acl file. Please post the contents of your ACL here.
  22. Zango

    Server Issue. Help :S

    I've got Windows 7 and I have no issue with server list retrieval. What version of Windows 7 are you on? I didn't see anything about running MTA/GTA in compatibility mode, have you tried this? (Windows XP SP3).
  23. I think your correct at first, he want's the weapon to fire but the bullet to disappear. (so basically just the sound, FX and anim) Don't know if it's possible to remove projectile (I don't think they are handled yet) but you can remove damage.
×
×
  • Create New...