Jump to content

FatalTerror

Members
  • Posts

    304
  • Joined

  • Last visited

Everything posted by FatalTerror

  1. I thought loadstring make the diference by himself. Only the server script is loaded. The client script doesn't work. For the server, the client file doesn't exist. It's weird. server-side: if fileExists (":"..mapToLoad.."/"..xmlNodeGetAttribute (node, "src"))then if(xmlNodeGetAttribute (node, "type") == "server")then -- server script outputDebugString("Call loadstring from serverside") local file = fileOpen (":"..mapToLoad.."/"..xmlNodeGetAttribute (node, "src"), true); if file then local buffer; while not fileIsEOF(file)do buffer = fileRead(file, fileGetSize(file)) local l = assert(loadstring(buffer))(); end fileClose(file) end else -- client script outputDebugString("Call loadstring from clientside") triggerClientEvent("doLoadStringClientSide", getRootElement(), ":"..mapToLoad.."/"..xmlNodeGetAttribute (node, "src")) end end server-side: addEvent("doLoadStringClientSide", true); addEventHandler("doLoadStringClientSide", getRootElement(), function(name) outputDebugString("Receive "..name) if(fileExists(name))then local file = fileOpen (name, true); if file then outputDebugString("File exist?") local buffer; while not fileIsEOF(file)do buffer = fileRead(file, fileGetSize(file)) loadstring(buffer)(); end fileClose(file) end else outputDebugString(" The script file doesn't exist !", 1); end triggerEvent("onClientResourceStart", getResourceRootElement(getThisResource())) end)
  2. My current loadstring() is on a file server-side and i'm trying to load a script client-side. The triggerEvent will call a client event not server. You know what I mean? Maybe it's the reason of the bug, i don't know.
  3. Obviously, something went wrong. Are you sure we can do a trigger from server side to a loaded script in client side?
  4. Can you explain a bit more please?
  5. Hi everyone, I'm trying to load a script file with the loadstring function. The problem is that: In the script file i've an event handler OnClientResourceStart but the resource is never started because i call it from my other resource. File to load function lol() outputDebugString("Hello") end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),lol) And on my resource: local file = fileOpen (":"..mapToLoad.."/"..xmlNodeGetAttribute (node, "src"), true); if file then local buffer; while not fileIsEOF(file)do buffer = fileRead(file, fileGetSize(file)) local l = assert(loadstring(buffer))(); end fileClose(file) end Someone know how to fix that? Big Thanks.
  6. Hi everybody. I need your help for something that i want do. I found on the wiki page that function SetVehicleVariant and I'm trying to understand. I've seen this picture and I'll do the same thing with the infernus like in the picture. I don't know how to add a vehicle variant in a vehicle. In the picture, they do it. If someone know and can help meh for that I read this: It doesn't help me so much Thanks guys !
  7. No need to organize it, I already won ;o
  8. I try this but it's not very simple to use. A square image? Nobody have any other solutions?
  9. Hi everyone. I've a little problem with my image. When I want to draw my transparent image, he make a sort of border in the transparent area. I'm using the power of two for my image size: (1024x128). dxDrawImage( Area.background.x, Area.background.y+(Area.background.h/2), Area.background.w, Area.background.h, "img/lolcat.png", 0,0,0, tocolor(255, 255, 255, 255), false); I don't know how to fix it. If you have any solutions give. I'm here. Thanks for your help. FatalTerror.
  10. No stress guys... http://code.opencoding.net/mta/mtaphpsdk_0.4.zip
  11. You don't understand. I must have the serial from PHP only, i want know how MTA store this serial for get him. If MTA store him into a file, i can get the text of this file via PHP.
  12. Hi everyone, I want get the player serial via PHP but i don't know how MTA store him. If someone know, tell me. Thanks, FatalTerror.
  13. Server name: .: LoD - Lords of Destruction Server IP: 46.29.23.162:22035 Server owner: Unknow Using server tags: FFS AMG EPG TG VIP Screen:
  14. Colsphere & learn lua.
  15. https://wiki.multitheftauto.com/wiki/CopyAccountData
  16. Yea, you are right With this example, you learn how transfer informations Site > Server. You say to the server to get the name of your cat, the site get & return it to the server.
  17. Well, hi... I don't make this sdk, i just learn for some guys how use it. Sometimes i can use old syntax in my code that is true but it work x) Regards, FatalTerror.
  18. Server name: ~XrC~ Xtreme Race Clan * Internacional 24/7 -|TG|- [serverFFS.com] AMG, TRD By JavitO Server IP: 94.23.83.155:30930 Server owner: JavitO Using server tags: TG AMG TRD Screen:
  19. The light thing make me think to the Minecraft Redstone :3 Good job dude.
×
×
  • Create New...