Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. Also, you get warning or error message saying that in server console or debug window (/debugscript 2).
  2. Many people here ask for help without giving us much details about their problem. So, we have to ask the author of the topic to give us some more details. If you want us to help you and you don't explain what your problem is about, it doesn't help us to help you. WRONG way of asking for help: What information does this sentence give to us? We know that script doesn't work but we don't know why and in what way it doesn't work. We'll never know that unless you give us some more information about your problem. CORRECT way of asking for help: It helps us straight away. We know your script doesn't start when you try to run it and we have some of the code that we can tell you what you did wrong. What information should my question contain? - What is the reason you make new topic? Whether it's problem with your script or need help with something else. - Explain what is wrong? Tell us what happens when you test your script and what is that you want it to do. - Give us some of your code so that we can help you correct it. - Tell us if you get any error or warning messages and what they are. We can determine what causes the script not to work quicker.
  3. Because source in that function is root element not player. Use client instead. And there is no need to convert number to number. PlayerJob[client] = 2
  4. 50p

    MTA VARIABLES

    Neither this will work. 1st line is invalid Lua syntax. I let you fix it.
  5. 50p

    NIL

    You must declare your global tables. Like so: PlayerLogins = { }; PlayerMoney = { }; PlayerSkillPoints = { }; -- etc. etc. ... -- then you can use them inside of every function function OnLogin (prevA, curA, autoLogin) PlayerLogins[ source ] = ... end
  6. 50p

    MTA VARIABLES

    I don't know how this code can work properly without errors. You declare "account" variable which is player's account and then use it as if it was a table. Haven't you declared account as global table?
  7. 50p

    MTA VARIABLES

    It does work. You just need to declare PlayerMoney as table (array). Like, Jason_Gregory showed PlayerMoney = { } But his example code will not work since his example deletes the whole table when someone leaves the server. You'll have to delete just one cell in that table/array. Do something like this: addEventHandler ( "onPlayerQuit", getRootElement(), function ( ) PlayerMoney[ source ] = nil end )
  8. Why do you keep using onPlayerDamage in those scripts if you know this event is not triggered on god-children? It has to be client-side hack to detect godmode.
  9. Show us your code. I've never had problem with xml files.
  10. Have you tried to put addEvent( "onZombieWasted" ); Above addEventHandler? Make sure resource starts without any error/warning messages (it should).
  11. How do you start it? Do you run gamemode and then change the map? Do you get any errors/warnings?
  12. Why is the explanation crappy? Explain little more so we can fix it. meta.xml is fine although you should change the "type". These are "supported" types of resource and I'd recommend you stick to those because when you decide to upload your resource on community.multitheftauto.com you will get an error message. Make sure you start this resource or it in other resource to start automatically.
  13. No reason for this.. It's never disappointed me and always worked without adding it if it already exists.
  14. addEventHandler( "onZombieWasted", getRootElement(), function( killer ) givePlayerMoney( killer, 100 ); end )
  15. No idea. It happens to everyone, even after restarting client or reconnecting. You have to keep trying. Also, make sure your .txd has a texture that model asks for. You can use TXD Workshop to do that.
  16. Explain little more what you don't know? You can make a map file with your markers in it, randomly choose one of them and create it with createMarker. That's what I did with my "trucker" script on FREESTATEPROJECT server. Knowing "element tree" is a plus to script it easier: https://wiki.multitheftauto.com/wiki/Element_tree
  17. There are a few ways to do it. You can setElementData of that vehicle and check it in onVehicleExplode so that you can respawn it. You can make a variable that holds vehicle element and in onVehicleExplode check if the destroyed vehicle is the one that variable holds.
  18. LOD can't be greater than 500. If it's lower than that and you want it to be 500, you can set it with engineSetModelLODDistance. If textures aren't loaded, load them again. It's been said many time on this forum... You can make a function to load textures and players can call it when textures need to be reloaded (can be onClientResourceStart or command or both).
  19. 50p

    Help on Fuelsystem

    If you have a variable that holds vehicle element then it depends how you want the script to work. You can call your own functions which deal with fuel running out, say: local vehicle = getPedOccupiedVehicle( player ); setTimer( YOUR_FUEL_FUNC, 10000, 0, vehicle ); -- it'll pass vehicle to YOUR_FUEL_FUNC function YOUR_FUEL_FUNC( veh ) -- timer called this func and passed vehicle element -- veh will be vehicle element that timer passed in when calling this function end It's hard to give snippets because such snippets may not make sense to you. You should start your script and show some code, that way we can suggest what to change or what is wrong in your code. In case you didn't know, there are fuel scripts already: https://community.multitheftauto.com/index.html?p ... ils&id=119 https://community.multitheftauto.com/index.html?p ... ils&id=190 They are pretty old, so I don't know whether they work or not.
  20. 50p

    Help on Fuelsystem

    How else do you want to do it then?
  21. I think you should spend more time on wiki. Not "this" but "client" since event handler is not attached to player but root element (in the script on the 1st page of this topic). https://wiki.multitheftauto.com/wiki/AddEventHandler
  22. Where did you find engineImportDFF? Such function doesn't exist unless you created it in your script. If you have only one txd that probably means it's a shared texture and can be used with all of the .dffs you have. Load texture once and import it for different models. Like so: dff = engineLoadDFF( "hjp03.dff", 0); engineReplaceModel( dff, 3914 ); dff = engineLoadDFF( "hjp04a.dff", 0 ); engineReplaceModel( dff, 3911 ); dff = engineLoadDFF( "hjp04b.dff", 0 ); engineReplaceModel( dff, 3910 ); dff = engineLoadDFF( "hjp04c.dff", 0 ); engineReplaceModel( dff, 3906 ); txd = engineLoadTXD( "chinaspeed.txd" ); engineImportTXD( txd, 3906 ); engineImportTXD( txd, 3910 ); engineImportTXD( txd, 3911 ); engineImportTXD( txd, 3914 );
  23. 50p

    Web request

    I've never had that problem. This means, your call fails because server returns error >=400 (page not found, timeout, access denied, etc.) Either your MTA server can't access the website or your site is down but you said you can access it from browser, so the site is not down, this is weird. Make sure the site you're sending request to in callRemote is valid and that your resource can use callRemote function (acl.xml).
  24. 50p

    [HELP] MySQL

    What do you want "Admin" data to be? You don't want the query to be stored in element's data, do you?
×
×
  • Create New...