Jump to content

aralmo

Members
  • Posts

    13
  • Joined

  • Last visited

Details

  • Gang
    Vagos

aralmo's Achievements

Square

Square (6/54)

0

Reputation

  1. Yeah, sames like some kind of bug in the registry.db file. I just created a db file with database browser and now it works. Thanks anyway
  2. Hi, im having problems using the sql commands in MTA. When i use the executeSQLCreateTable dosn't work, the other commands crash my server. Already tryed to reset the db, executed the demo scripts in the wiki, and create a table with dbbrowser first, and nothing. It always crash the server. Any idea?
  3. This script is just amazing, how far you can go in MTA. I want to use it on my rpg system to customize your house with placeables. Nice work, keep it up!
  4. Thats true with complex search like joins. But if youre accessing subnodes inside a known node, its pretty fast, mostly the same than mySql. I find xml good enough to save this kind of things, maybe if u need more complex data with relations and stuff thats not the best way.
  5. Yeah, youre right. Too much time without sleep i guess, tested it again right now and it was already working good. Sorry bout the time waste.
  6. It works perfect to me too, but also had that problem. When registering a player i was setting the email before login and it deleted the account's data, just moving a line within a if and it works now perfect. Btw im using a lot of variables inside account data.
  7. I think you can do it with something like that on clientSide using the onClientRender event. local sphere = createColSphere( posX, posY, posZ, radius ) local closePlayers = getElementsWithinColShape( sphere, "player" ) The sphere should be the collision area of the damaging object, and the closePlayers are the players currently hitting it.
  8. Gamesnert: Yeah thanks, im using it without target because the event was attached to the player element. But that its not working at all. Right now i got a login/registration page, a working character sheet and a skill upgrade window. Everything works perfect if you don't change the nickname before login. So my next question is, there's anyway i can attach a client event to the client element, not the player? because the player element changes when you change your nick. Right now i have something like this Client code: addEvent("MyClientEvent",true) addEventHandler("MyClientEvent",getLocalPlayer(),myEventHandler) Server code: function clientLogin(old,new) triggerClientEventHandler(source,"MyClientEvent",source,false) end It works if old=new in clientLogin else it dosn't ejecutes the handler on client-side. Thats making me crazy, did all the stuff in about 5 hours but those small things took-me like 2 days until now. [edit] oh! and another noob question is lua object-oriented? can you create a class with inheritance on it? Thanks.
  9. Hi, im looking for a coordinates and camera matrix picker to create spawn points, markers and fixed cameras. There's any gamemode/resource available to do this? or should i code one? Thanks.
  10. 50p Thanks!, now it works perfect. Do you mean the SubmitLoginEvent in server side? im triggering it without propagation on the root element is that right? or should i create a new eventhandler when a player connects and attach the event to it? By the way im very impressed with the scripting in MTA much better than SA-MP's PAWNO imho. I'm definitely switching to it
  11. Just realized that source wasn't pointing exactly to the player object .
  12. Im working on a login / register screen for my first gamemod ever in MTA, but im having some weird problems with it. Perhaps some experienced user can help me I have two problems. The first is that when i connect to my localhost server for first time the client script don't work, i must disconnect and connect again and then it loads ok. I think is some kind of bug with the download manager?. The second one is a problem calling the client event that shows the login screen, it only works the first time i call it. Thats my code: Server side: function playerJoinHandler() outputChatBox("Player connecting...",source) triggerClientEvent("ShowLoginGUIEvent",source) --trigger the client event of the player end addEventHandler("onPlayerJoin", getRootElement(), playerJoinHandler) function SubmitLoginHandler(user,pass) outputChatBox("slh",source) local acc = getAccount(user) if (not acc) then outputChatBox("This name is not registered.",source) triggerClientEvent("ShowLoginGUIEvent",source) --trigger the client event of the player else if (logIn(source,acc,pass)) then outputChatBox("Login correct.",source) else outputChatBox("Login incorrect.",source) triggerClientEvent("ShowLoginGUIEvent",source) --trigger the client event of the player end end end addEvent("SubmitLoginEvent",true) addEventHandler("SubmitLoginEvent",getRootElement(),SubmitLoginHandler); Client side: function guiShowLogin() outputChatBox("Login.", getLocalPlayer()) CreateLoginWindow() addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) end showCursor(true) guiSetInputEnabled(true) end addEventHandler("ShowLoginGUIEvent", getLocalPlayer(),guiShowLogin,false)
×
×
  • Create New...