Jump to content

dzek (varez)

Retired Staff
  • Posts

    4,144
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by dzek (varez)

  1. I'm not starting any wars, I just know that I don't need to pay x2 for something that can't run most things I need every day Same for other Apple things (Iphone, Ipad, etc) I know that much things are created on Macs (but never heard that games are made with this). I just don't care.
  2. Read freaking stickies! viewtopic.php?f=91&t=26541
  3. wut? if variable then outputChatBox("1") end will output 1 if variable equals to true. will not output if variable is nil or false. It's logical: if true then outputChatBox("1") end -- will always output if false then outputChatBox("1") end -- will never output -- logical eh? -- "if" conditional is passing when after "parsing" all checks the results is "true" - it's standard across all coding languages
  4. can you copy and paste the code it outputted? There is a problem with syntax for sure
  5. lol? type "start joinquit" in server console, or login as admin and do the same in game console ... he cant do that
  6. well, this is extremly important, you dont want your database to be removed by somekind of "hacker"
  7. much better you can do also: outputDebugString(getElementData (pu, "type").." --- "..getElementData (pu, "vehicle")) oh! i just realized that getElementData from map file will probably return string for all values. this means for numebrs too. so "425" (string) will never equal to 425 (integer) ! getElementData(pu, "vehicle") is probably returning "425" and getVehicleModelFromName is returning 425 (number) for sure. if getElementData ( pu, "type" ) == "vehiclechange" and getElementData ( pu, "vehicle" ) == tostring(getVehicleModelFromName ("Hunter")) then -- if2 if you will do debug with displaying each value - you will easly see that
  8. read this: https://wiki.multitheftauto.com/wiki/BindKey and this: https://wiki.multitheftauto.com/wiki/AddCommandHandler In both you should use first argument in hander function to get position and rotation - becouse its the element that caused to fire that function. There is no "source" in both. Just replace "command" with something more suitable like: playerElement and replace all "source" with playerElement also
  9. weird.. this is so simple script and have more comments in one day than Burnout or Cruise Control (which was requested several times on the Scripting section) in weeks!
  10. something like. but you can set only strings as the value (can't be another element or array or anything, only string). but if you don't know for what is it - why you want to use it?
  11. Or - get this: http://upload.dzek.metal.info/pliki/Lua.rar - extract it to C:\Lua (can't be another folder!) - then copy your lua file you want to compile (like: myscript_client.lua) to C:\Lua - go into that folder - drag your file to compile.bat file - after compiling - file called luac.out will be created - it's your compiled file !
  12. before executing do outputDebugString with that long string you gave us - and you will probably see what's wrong. Your query syntax is incorrect, and it's hard to see becouse it looks so messy - it's much simplier to display query before execution. And do you know about SQL Injection? Maybe some strings are unescaped, and contains single quote character --> ' <-- which makes query incorrect? Little eqample (unrelated to your database) name = "My Mansion" owner = "varez" query = "INSERT INTO houses (name, owner) VALUES ('"..name.."', '"..owner.."')" -- after displaying: INSERT INTO houses (name, owner) VALUES ('My Mansion', 'varez') -- and it's ok -- but this will fail (and it's unsafe!!) name = "varez's house" owner = "varez" query = "INSERT INTO houses (name, owner) VALUES ('"..name.."', '"..owner.."')" -- after displaying: INSERT INTO houses (name, owner) VALUES ('varez's house', 'varez') -- See that single quote line above? It's breaking the query, making it incorrect. -- In this way somebody can inject custom query (like DROP DATABASE!) -- Read about MySQL data escaping.
  13. and from where you got that script? You can't make something like this and don't know what's wrong - it's way too hard
  14. why are you using getPedOccupiedVehicle ? source is the vehicle that exploded in onVehicleExplode event. i think you need to prepare 3 separate functions for onResourceStart/Stop, onPlayerQuit/Logout, onVehicleExplode - so source can match the things you want it to be
  15. http://canyouseeme.org/ You can try TCP ports with it (MTA needs 3 ports: one for game (UDP), one for internal http server (TCP), one for Game-monitor). Default values: 22003 (UDP) for game data, 22005 (TCP) for http server, 22126 (UDP) for Game-monitor. So only 22005 will be available for testing - but if it works, others should work fine too. Also you can connect to your server http if you start one of resources (can't remember name) and simply point your browser to http://your.ip.number:22005/ If you want to be sure if it's accessible from another computer - try http://hidemyass.com/ - but it's a lot simplier to ask somebody to open it. And for UDP checking, I'll quote another forum: So there isn't a simple webpage for testing it, cause it needs to send data in proper format, but the simpliest possible way is to force game-monitor to check your server - if you register on their website and wants to manually add a server - they're showing data from it before you can continue. You will need to wait anyway, to see your server on game-monitor list, but at least you can be sure it see your server.
  16. use onClientPreRender for camera matrix setting - and i havent successfully make custom camera with mouse look - but it's possible in some way - there was a server with fps look.
  17. you are asking to ADD another model, texture, and assing new ID to that vehicle? if yes - its NOT POSSIBLE. if you just want to place vehicles around the map - use map editor
  18. so every checkpoint - do it all again (set dimension of all markers)
  19. Welcome to MTA, LUCAGRABACR I'm pretty sure you will be amazed many times with MTA features! Also we have good community here, hope you will stay with us. Happy playing
  20. last three should be attached to getRootElement() i think, as i dont think your resource is parent of all vehicles and players?
  21. so just simple ped with looping animation? should be easy with edf, but personally i never make any edf
  22. You remind me this: http://izismile.com/img/img3/20100909/f ... ter_01.jpg Somebody should add: You can't play MTA to this graphic
  23. There is no problem with attaching camera to the player, the problem is you can't use your mouse to free look.. But i don't know if this can be solved anyway (never seen such thing in scm, original gta scripting)
×
×
  • Create New...