Jump to content

xXMADEXx

Members
  • Posts

    2,718
  • Joined

  • Last visited

Everything posted by xXMADEXx

  1. I've never tried it, but I found this on Google... lol http://exchange-paysafecard.gr/
  2. Found the problem. Had to change the function name from "Downloader:HandleResponse" to "Downloader.HandleResponse", and it works fine. Lol, probably something to do with OOP.
  3. Yeah, it's extremely weird. Files are indeed encoded in UTF-8. I even tried this: -- Downloader:HandleRequest -> Used to handle response from the server for the mod list function Downloader:HandleResponse ( list ) outputDebugString ( "From Server -> Downloader:HandleResponse called. List: ".. tostring ( list ) ); Downloader.Mods = list; setTimer ( function ( ) Mods:PhraseList ( ); end, 500, 1 ); if ( source and source == localPlayer ) then triggerEvent ( "ModDownloader:OnServerSendClientModList", resourceRoot, "LOL TEST - 2" ); end end addEvent ( "ModDownloader:OnServerSendClientModList", true ); addEventHandler ( "ModDownloader:OnServerSendClientModList", root, Downloader.HandleResponse ); and list is still returning nil.
  4. mods is definitely a table on the server side (I've confirmed it) I used double localPlayer, because at first the server-script was setup for that input, but I changed it thinking that could be the reason. I've just tried: function Loader:HandleRequest ( plr ) local mods = "test"; outputDebugString ( "From client: Got request list -> sending response. List: ".. tostring ( mods ).. " | source: "..tostring ( source ) ); triggerClientEvent ( source, "ModDownloader:OnServerSendClientModList", source, mods ); end addEvent ( "ModDownloader:RequestFilesFromServer", true ); addEventHandler ( "ModDownloader:RequestFilesFromServer", root, Loader.HandleRequest ); and list is still returning as nil on the client side.
  5. Good job. Someone already made one of these a while back though. https://community.multitheftauto.com/index.php?p= ... ls&id=3120
  6. Hey guys. I'm having trouble with triggerClientEvent. For some reason, it's not sending my "mods" table from the server to the client. On the server, "mods" is a table (I have confirmed it - see screenshot), but when I trigger it to the client, it becomes nil somewhere along the way, and I'm absolutely clueless why. I think it might be some basic bug I've written on accident that I can't find. Ignore the timers, I was trying to see if it had something to do with that, but it doesn't. Debug log: http://i.imgur.com/sB6yKCa.png Client Script (cMods.lua and cDownloader.lua) -------------------------------------- -- cMods.lua -- -------------------------------------- Mods = { } -- Mods Constructor function Mods:Mods ( ) for i = 1, 20 do outputChatBox ( " " ); end setTimer ( function ( ) -- Did the server have time to load the list?? outputDebugString ( "From Mods:Mods -> Downloader:Request( )" ); Downloader:RequestList ( ); -- Get list from server end, 5000, 1 ); end -- Mods:PhraseList -> Used to check mods list for enabled mods function Mods:PhraseList ( ) local list = Downloader:GetList ( ) -- Get list from Downloader class outputChatBox ( "Phrasing" ); -- Loop through the list and find completed downloaded files for index, mod in pairs ( list ) do list [ index ].enabled = false; local name = mod.name; local txd = mod.txd; local dff = mod.dff; local replace = mod.replace; outputChatBox ( tostring ( name ) ); end end addEventHandler ( "onClientResourceStart", resourceRoot, Mods.Mods ); -------------------------------------- -- cDownloader.lua -- -------------------------------------- Downloader = { } Downloader.Mods = { } -- Downloader Constructor function Downloader:Downloader ( ) end -- Downloader:RequestList -> Used to request vehicle mod list from server function Downloader:RequestList ( ) outputDebugString ( "Downloader:RequestList -> Sending server request" ); triggerServerEvent ( "ModDownloader:RequestFilesFromServer", localPlayer, localPlayer ); end -- Downloader:GetList -> Used to get the mods list downloaded from server function Downloader:GetList ( ) outputDebugString ( "Downloader:GetList called" ); return Downloader.Mods; end -- Downloader:HandleRequest -> Used to handle response from the server for the mod list function Downloader:HandleResponse ( list ) outputDebugString ( "From Server -> Downloader:HandleResponse called. List: ".. tostring ( list ) ); Downloader.Mods = list; setTimer ( function ( ) outputChatBox ( "Got" ); Mods:PhraseList ( ); end, 500, 1 ); end addEvent ( "ModDownloader:OnServerSendClientModList", true ); addEventHandler ( "ModDownloader:OnServerSendClientModList", root, Downloader.HandleResponse ); Server Script (sLoader.lua) Not the whole script - the rest is loading/creating of the XML file -- Loader:HandleRequest -> Handles request of mod files from client -- Sends client new mod list function Loader:HandleRequest ( plr ) outputDebugString ( "From client: Got request list -> sending response. List: ".. tostring ( mods ).. " | source: "..tostring ( source ) ); triggerClientEvent ( source, "ModDownloader:OnServerSendClientModList", source, mods ); end addEvent ( "ModDownloader:RequestFilesFromServer", true ); addEventHandler ( "ModDownloader:RequestFilesFromServer", root, Loader.HandleRequest );
  7. Are you sure you're giving them the correct IP addresse? (http://whatsmyip.org) If so, make sure you set the ports to the correct protocols: 22003: UDP 22005: TCP 22126: UDP This could also be from a firewall. Try adding an exception to the windows firewall: Control Panel -> System and Security -> Allow an app through Windows Firewall -> Change Setting -> Check "Private" and "Public" for "mta server.exe" and "Multi Theft Auto Server" -> OK If you can't find "mta server.exe" or "Multi Theft Auto Server" then do the following: Control Panel -> System and Security -> Allow an app through Windows Firewall -> Change Setting -> Add another app... -> Find the mta server.exe and select -> Add -> OK
  8. This would still allow the script to get the team of a vehicle.. It should be something like this, at the beginning of the movingObject function. if ( getElementType ( hitElement ) == "vehicle" ) then hitElement = getVehicleController ( hitElement ); if ( not hitElement ) then return false; end end
  9. Ok,but i don't know how to use this functions or how to install. It's not very hard to learn, just look at the engine function examples. And what do you mean when you say MTA doesn't have very much functions? It has a function for nearly everything you need (not quite everything yet, but they're getting there) Client: https://wiki.multitheftauto.com/wiki/Cl ... _Functions Server: https://wiki.multitheftauto.com/wiki/Se ... _Functions
  10. I completely agree and support this idea. Often times, I look for a new server to join (About once every two weeks maybe), because I can't really find one that "suits" me, and nearly every server I join, they're speaking arabic or some other crazy language. It's totally getting harder and harder to find English servers.
  11. Cool, but not really a shader, just an image.
  12. Are you sure the error is being produced in this function? You checked if the object exists with isElement, so I don't see why there would be an error there.
  13. xXMADEXx

    Help Please

    Thank U. Can you give an example? Just goto the wiki page, they have examples there for every function and event. For this function: https://wiki.multitheftauto.com/wiki/SetVehicleHandling https://wiki.multitheftauto.com/wiki/Main_Page
  14. I'll probably release it when either MTA 1.5 is a little more stable, or when MTA 1.5 is officially released.
  15. What do you mean by "work second planes?" It can have multiple tabs, but I set the limit to 8, so that the tabs don't overlap the New Tab button or go off the screen.
  16. xXMADEXx

    help

    To make the camera like that, you could probably use setCameraMatrix, and to make them drive only straight, try using toggleControl.
  17. xXMADEXx

    Which To buy

    https://www.ovh.com/us/vps/vps-classic.xml This is probably the cheapest VPS you'll find.
  18. IPB uses encryption, it wouldn't just be simple stuff such as INSERT or SELECT.
  19. Hey guys, So, many of you know that MTA will be supporting browsers in MTA 1.5. This gave me the idea to make MadeBrowser (Cheesy name, I know.) Anyway, right now it's working but a little bit buggy due to the fact that MTA 1.5 obviously isn't stable yet. Here are some screen shots:
  20. If you're having issues, please add me on Skype. I will help you figure it out!
  21. xXMADEXx

    modLoader

    Please look at this: viewtopic.php?f=108&t=67500 You don't to edit the meta at all.
  22. It's definitely possible. Take a look at this: viewtopic.php?f=148&t=47889
  23. xXMADEXx

    modLoader

    It's a little bit out-dated, now that MTA has the downloadFile function. I should probably make a new mod system using that...
  24. Be sure to check errors in debugscript before posting. (/debugscript 3) This is caused, because "source" isn't defined in the deathHandler function. Try this: local spawnX, spawnY, spawnZ = 133.78814697266, -35.417057037354, 1.578125 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to the test server!", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function deathTimer() setTimer(deathHandler,5000,1, source) end local spawnX, spawnY, spawnZ = 133.78814697266, -35.417057037354, 1.578125 function deathHandler( source ) spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("And... BAM, you're back!", source) end addEventHandler("onPlayerWasted", getRootElement(), deathTimer)
×
×
  • Create New...