Jump to content

Dark Dragon

Members
  • Posts

    1,619
  • Joined

  • Last visited

Everything posted by Dark Dragon

  1. logIn requires a string of the account name, not the account, use your "user" variable
  2. and easy way would be creating 2 invisible objects, which you use moveObject on then get their coordinates in onClientPreRender -> setCameraMatrix
  3. this thread is a mess, i will just close this before it gets worse. the pages i linked are the relevant ones you need, good luck
  4. would you please listen to what talidan said? also treat other members with respect, do not insult each other.
  5. wise decision! creating own scripts and resources is fun and the best way to make your server something special. i guess you won't find a personal coach here, but using provided tutorials, etc you should be able to learn it quite easily. those are recommended pages to start with: https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI http://robhol.net/guide/basics/ https://wiki.multitheftauto.com/wiki/Debugging https://wiki.multitheftauto.com/wiki/Resources https://wiki.multitheftauto.com/wiki/Meta.xml if you have problems understanding the very basic things or the structure of the code you might want to try a general lua tutorial first http://lua.gts-stolberg.de/en/index.php?uml=1 if you need more help you can contact other scripters via irc or ask for help with more specific questions here on the forums.
  6. a handy thing with tables is that the last comma can be there but is not needed, but having it there is comfortable when simply copying and pasting new lines huh?
  7. the problem could be that onPlayerJoin is triggered before the client is even able to download and start the resource client side, resulting in an event being triggered which the client wasn't able to add yet. let the client trigger a server event onClientResourceStart which asks for the information you need (if he is logged in already) on a note here, getPlayerAccount (getAccount does what you want but needs a user name and password!) will not tell you if that person created an account on your server yet but will return the account he is currently logged into, if he is not logged in a guest account will be returned. your client side code also uses some server side only functions (see the orange color) which need to be replaced. however to check if the person has created an account on your server before you can use a client side xml file filled with information when registering (could for example store your account name, so you don't need to retype it every time), this would also kill the need of the server triggering a client event on join. i hope i got your intention right
  8. every 30 seconds? wow thats real spam local messageTable = { "a message", "another message", "something totally different", "etc...", } function outputSpam() outputChatBox(messageTable[math.random(1,#messageTable)],getRootElement(),255,255,255) end setTimer(outputSpam,30000,0)
  9. you know that print only outputs the message in the server console, don't you? if not try outputChatBox
  10. tried reinstalling mta? (with server being checked when installing)
  11. But not for everyone to repost 3409742234 times while claiming it as their own... like anyone would think the people who upload them there made the models. yeah it's actually sad for the ones who really created the models themselves.
  12. Cuboids don't have a radius, they have width height and depth https://wiki.multitheftauto.com/wiki/CreateColCuboid
  13. i recommend using one of the tools below to design your gui: https://community.multitheftauto.com/index.html?p ... ils&id=141 https://forum.multitheftauto.com/viewtop ... 91&t=27739
  14. the difference is that the original creators offered their work for free and for everyone to use.
  15. the function you're looking for is addCommandHandler
  16. still line 3, make it getAccountData and put the player account there instead of the player, and no you need to use tonumber on getAccountData, because getAccountData returns a string: https://wiki.multitheftauto.com/wiki/GetAccountData
  17. Dark Dragon

    Q:Bots

    there is no real limit for peds, you can have thousands of them all over san andreas, but if you have too many on the same spot some might not show up correctly due to limits of the gta san andreas engine. to give him a weapon use giveWeapon with a timer setTimer(giveWeapon,1000,1,ped,9,1,true) replace 9 with the weapon id you want him to carry the easiest but also sloppiest way to make this ped invulnerable is to set its health rapidly setTimer(setElementHealth,50,0,ped,1000) put those lines at the bottom of the resourceStart function
  18. as you might have noticed the problem is not a small one and a bit out of control. we need some time to come up with a solution, feel free to suggest something, but keep in mind that there are probably still many people who don't know anything about scripting who are unable to change the necessary lines themselves and therefore really appreciate the tons of car models.
  19. you call OnPlayerJoin when the local client started the resource, but the source of onClientResourceStart is not the local player because onClientPlayerJoin has no parameters you can use this (hacky) way, but don't tend to try it with other events! addEventHandler( "onClientResourceStart", getRootElement(), function(startedRes) OnPlayerJoinToServer(getLocalPlayer()) -- use the local player as first parameter end ); function OnPlayerJoinToServer(theplayer) local player = theplayer or source -- set our target player to be theplayer if existent, else to source outputChatBox("* " .. getPlayerName(player) .. " зашёл на сервер.") -- are those next three lines really what you want to happen whenever someone joins? -- you might want to put those lines in the function above. fadeCamera(true) setCameraTarget(getLocalPlayer()) setCameraMatrix(1478.797119, -1756.001953, 115.093994, 1528.569336, -1670.147827, 102.773277) -- end addEventHandler("onClientPlayerJoin", getRootElement(), OnPlayerJoinToServer)
  20. Dark Dragon

    Q:Bots

    try to type 'refreshall' in the console before trying to start it. and no, the xml should be fine, the resource works perfectly for me. maybe you are in another dimension?
  21. i think you should consider leaving mta alone then. this is a multiplayer mod.
  22. Dark Dragon

    Q:Bots

    yes animations are possible, i'll include the script to create the ped but to apply an animation to it you'll need to know the exact name of the animation (and it's block) first. https://wiki.multitheftauto.com/wiki/Animations
  23. give people some time to see your problems and help. do you create the button you assign the event to anywhere? try tonumber(Moneyplayer) in line 3 and 6 (you even force the setElementData to save it as a string) plus variables are case sensitive(line 6). if this works you should read this page to be able to solve future problems by yourself: https://wiki.multitheftauto.com/wiki/Debugging client side you need no player parameter in outputChatBox
  24. Dark Dragon

    Q:Bots

    is 6 the rotation of the ped? do you expect the ped to do anything?
  25. you can't simply re enable it. it just doesn't work like that.
×
×
  • Create New...