Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. Hitting something without a collision is impossible without any workaround. You can add a colshape around it and attach some default data to it, you can also just create your own collision files in 3Ds max or something like that. If you want to go for a cheap solution; add an object with a collision on the same location and make it's opacity/alpha 0. This'll hide the object, yet still fix the collision thing. If you're rendering in the faaaaaar distance, hitting it would be harder but not impossible.
  2. You can always add a command to see if it can attach the vehicle. If your vehicles have any ID linked to them you can do it like; user uses a command with an ID check if the vehicle with the ID is close and the user is in a vehicle. attach them.
  3. with just this, we can't help you. What's in spawnMenu, what's in openMe.
  4. Why don't you just use the same hash from MyBB's php class and transfer it towards Lua? A lot less hussle with calling sites and what so ever.
  5. change the text from the password's location to; string.rep ( "*", #)
  6. As a fuel system.. I would not sync the fuel to every single client. Think about it.. 300 people, 1500 cars. All driving around like massive drag racers. Bigger distances, more calculations, every second, that goes to around 450K of triggers towards all the clients in total ( each client gets 1500 new triggers ). that'll sure as hell bring some trouble. I would keep them server sided, once a player enters a vehicle, request the fuel from the server's side, set it client sided just for the driver and keep updating it on the server's side but also the client's side. Ping a verification every minute to see if they both match. Server is always right on this one. Do note that you can't have 1500 cars driving with 300 players, that would be 5 cars a person. But don't forget that not everyone turns off their engine and it still uses the fuel.
  7. you're adding the event over and over again. You should move the function you've created inline into it's own function, and add/remove the onClientGUIClick handler on the open/close event from the menu.
  8. there are actually some useful functions for this already; https://wiki.multitheftauto.com/wiki/DxDrawCircle The rounded rectangle is a bit harder to do. You might want to write that yourself.
  9. There is, and if you're paying a nice price I'll be up for the job. Just shoot me a PM.
  10. vG is Valhalla Gaming, it's a roleplay community which used to be the best out there. Their files got leaked after some mistakes and now a lot of users are using their files. However, the MTA community itself is against using leaked files and therefore almost no one will actually help you with this. We support each other when they create their own files, we won't do that with things that have been taken and used.
  11. Well this is what I purchased https://sellfy.com/p/TH54/ and I have the basic vG UCP; basically I want to integrate all logging in functions, characters, etc. from vG to this other one. Message me your skype if you'd like and we can talk more. I am willing to pay (depending on price) You're running a vG edit?
  12. An UCP based on HTML is the biggest scam you've ever ran into.
  13. That's the more appropriate way and best way to go with, haven't thought about that.
  14. Chill your massive manboobs, jesus.. no need to go all badguy on him. If you can't handle people who don't understand a lot of LUA or if you lose your temper so freakin' fast, don't help them. There are others out there which can and will help them.. @OP; I've replied to your other topic, that should work. Read the whole page. If someone wants help and doesn't know how to do something, he should listen to others. I wrote the same thing over and over, but he always didnt listen and said it would be wrong. Do we have to get 1000+ posts to help people?! I already wrote so many things and really waited for his responses, a "then don't help" is to late, I already wasted my time and he still thought he knows it better, didnt want to listen to me. Oh and you didnt really help someone by sending a code. He doesnt seem to understand everything, I tried to teach him what interior is. The same questions will continue if no he never learns about how to switch interiors. Overwriting the entire function wasn't the option for him. He wanted a simple way of doing it, sure your way works but if he doesn't want to use your way or doesn't like your way, so be it. all he wanted to know is some kind of even trigger that got fired when the player is outside the interior AND the distance is bigger than a certain amount. You're not wrong, I would've gone for the same actual overruling function too. But that's something you do in complicated systems, not in a tiny robbery where the user wants to see if the distance is bigger than 100 meters or something like that.
  15. I've just tested it and it works. You just have to replace the command by something you need/want. As in; trigger it every 50ms or what so ever. The command is there to show the actual working progress of the script.
  16. If your gta3.img is modified and the value is "none" ( like it is now ), the player will be kicked. If you want to allow them, replace none with peds
  17. the event is only triggered when the resource has been stopped or destroyElement has been used. I don't think that there is a way to see how the object has been destroyed..
  18. It's loaded by default, you just have to enable it. You can read more about that here; https://wiki.multitheftauto.com/wiki/OOP#Turning_it_on
  19. Yes, you can use c++ but no.. I wouldn't do that. The only way you're able to use c++ in MTA is by using plugins you write yourself but these do have a delay because they have to be called from the client towards the server and will turn your script into a bloody mess. If you're looking for OOP, there is. MTA created their own version of OOP in Lua, all of the supported functions are located on the wiki. For the paypal... I have no idea, never had struggles with that.
  20. That's weird, the table isn't filled in with double values like that, so the drawing must be wrong. Let's see what's going on in there.. edit; the drawing looks normal too. I'm seriously thinking that you're adding all the elements over and over again without clearing the table somewhere. I would need both of the files, entirely, to see where it's going wrong. You could send these in PMs if you don't want to put them out in the open.
  21. client function isPlayerConsoleActive ( thePlayer, callback ) if ( thePlayer == getLocalPlayer() ) then triggerServerEvent ( callback, source, thePlayer, isConsoleActive() ); end end addEvent ( "isPlayerConsoleActive", true ); addEventHandler ( "isPlayerConsoleActive", getRootElement(), isPlayerConsoleActive ); server addEvent ( "receiveActiveState", true ); addEventHandler ( "receiveActiveState", root, function ( thePlayer, state ) outputChatBox ( getPlayerName ( thePlayer ) .." his console is ".. ( state and "not" or "" ) .. " active.", source ); end ); addCommandHandler ( "isActive", function ( thePlayer, _, playername ) if ( playername ) then local player = getPlayerFromName ( playername ); if ( player ) then triggerClientEvent ( "isPlayerConsoleActive", thePlayer, player, "receiveActiveState" ); else outputChatBox ( "player not found.", thePlayer ); end end end ); by using the command: isActive the script will send a trigger towards the client from the player and return the answer to the callback. (not tested though, might be wrong)
  22. By looking at that, you're triggereing the event right here; triggerServerEvent("registerPredkosc", resourceRoot, localPlayer, vehicleP, timeP) Something that conserns me though is the fact that you're sending it to the server. A thing you can do is try to see if the text is already in the table by looping over it; function registered(plr,vehicleP,timeP) if vehicleP and timeP then local text = getPlayerName(plr).."-"..getVehicleNameFromModel(vehicleP).." time: "..string.format("%.2f",timeP).."\n"; if text then addText() for i = 1, #drag do if ( drag [ i ] == text ) then return; end end table.insert(drag,text) end end if #drag > 5 then table.remove(drag, 1) end end addEvent("registerPredkosc",true) addEventHandler("registerPredkosc",resourceRoot,registered)
  23. these are client sided functions and don't need a player in them. If you're using isChatboxInputActive then it automatically only works for that client. If you want to get it from another player, you'll have to trigger an event under their name to the client, execute the function and send a trigger back to the source with the answer.
×
×
  • Create New...