Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. By looking at your script, it seems like you've created a server sided script which won't work for the thing you want. You're going to have to use triggerClientEvent and triggerServerEvent in order to create the right markers for 1 person only, and make him finish the job which he started. The script is currently only working in a way for 1 person doing 1 job.
  2. By indeed taking the logic from the customblips resource, you're able to use dxDrawText instead of dxDrawImage to draw the images on the map, at the right locations. Just watch out with the length of text, since the image is an icon sized image, it should be calculated in the math. Changing that would be a bit more tricky.
  3. tosfera

    CEF

    There you go, your file will be messed up because of that. Therefore you should use the Javascript SDK and call the resource from there. Or you can use PHP to trigger the function, what ever you like.
  4. tosfera

    CEF

    Any errors if you open the html file in chrome/ie/edge in your js file? Also, the trigger you're using. Are you sure you've initialized the mta variable? If you're using the javascript SDK, which I assume you do, you can also try to call the resource's function directly without the eventHandler trigger. callFunction ( "resourceName", "functionName", returnFunction, errorFunction [, arguments... ] ); source; https://wiki.multitheftauto.com/wiki/Javascript_SDK
  5. tosfera

    CEF

    It's in your MTA settings, as far as I know.
  6. tosfera

    CEF

    Just a stupid question, is your javascript enabled? Are you sure there are no errors in the JS files? JS is a little kid that cries about everything and drops all of it's stuff when 1 thing is wrong.
  7. First things first, don't expect people to like scripts that are rushed. Everyone with a bit of common sense can see if a script has been rushed or made with a lot of effort and time. A lot of people have done this before, you're not the first. But a lot of people have failed due to this, don't follow them to that path. Take your time, people will notice it in the designs and the stability of your scripts.
  8. You can always think about something like; if the player jumps, and the distance from the player to the ground is bigger than Y, set the velocity in the direction the player is moving. If you want them to glide with the parachute open, you can trigger something when the event onClientPlayerWeaponFire gets fired.
  9. You should post this in the help section.
  10. tosfera

    Saving problem

    You've placed your "savePlayerExp( source )" after resetting the information from the player, try it like this; function onLogout (_,account) savePlayerExp( source ) setElementData(source, "player.level", 1) setElementData(source, "player.experience", 0) setElementData(source,"Rankicon","private") end addEventHandler ("onPlayerLogout", root, onLogout)
  11. @Dealman, putting the pet in there and making him use the handbrake will make it unable to get in the vehicle since the event isn't being fired. The people in previous comments said so, can't confirm this though. Never saw anyone able to hijack a ped. To actually get this working you should bind a custom function to your F ( or enter_vehicle key ) and check if there is a ped in the closest vehicle, check the distance, remove the ped and force the user to get into that vehicle by executing the enter function again. Won't be so much trouble after all, if it works.
  12. As far as I can see you're using the http function to call the actions, this forces the user to also have a webserver running at their local system or somewhere online. Am I correct? Most of the users wouldn't want it this way but it's quite a nice way, if you've protected it good enough. Too bad that you lack the time to continue it.
  13. tosfera

    Saving problem

    The first even that's being called is the first one in the file, which in this case is the function bound to this eventHandler: addEventHandler ("onPlayerLogout", root, onLogout) The best thing to do is to move the second event catcher you have inside the onLogout function. So move the saveData ( source, theAccount ) inside the onLogout function.
  14. I've been having some struggles with my own system too and thought; why not let my team create the GUIs for me. I tried that and they both failed since I apparently made it too hard. I've been thinking about creating a resource to create the GUIs ingame but then again, that would be such a time consuming thing and quite hard to create since it's a custom GUI system. But creating it as a website.. that sounds a lot easier since I'm a web dev in my roots. Good luck with yours, I can't wait to see what you've made out of it. Hit me up if you need some help! (:
  15. Freezing a vehicle/element would be a terrible thing to do.. a simple BMX could stop a freaking rhino with the handbrake applied to it. You can do a few things which indeed have been said in previous comments; 1. Whenever the vehicle gets streamed in, add a ped in there which applies the handbrake every now and then. This is however quite heavy for your server if you have let's say.. 50 people running around in a garage at different locations. 2. Increase the mass of the vehicle, since that didn't work for you early you might want to try and set it to the maximum value of 100000.0 which should actually work. Even though, a player with a higher ping has always been stronger than a person with a normal ping in MTA. 3. Resetting the vehicle's position would be a really bad idea too. It'll make it look like a shocking thing if it's done in a wrong way and your server won't like it. If you however do want to do it this way, make sure you're resetting it with an onClientRender. But then again, it will be really intensive for your server.. 4. If changing the mass doesn't work, you might have to try these handlings: fDragMult (dragCoeff), nPercentSubmerged (percentSubmerged, a ped can't be heavier nor push more than 99999kg I guess.. ). 5. A last thing you could do, which is actually more of a thing that can be done in RPGs but not in RP scripts; disable the collision for the vehicles. They'll be unable to be pushed or standing on top of them and things like that, yet they can still be used to get in and things like that.
  16. You're currently only decreasing the hight frm the image, you should also move the Y axis as in the position so it stays sticky to the bottom, yet gets decreased. Try something like this; local valor = getVehicleNitroLevel(vehicle) dxDrawImageSection(roundValue(screenWidth - 30), roundValue(screenHeight - 270) + valor, 26, valor*-1, 0, 0, 26, valor*-1, "image/nitrolevel.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
  17. If you want to combine a value and a string or what so ever, your first attempt was correct as in: GUIEditor.edit[1] = guiCreateEdit(11, 45, 444, 31,getElementData(localPlayer,"bankmoney") .."$", false, GUIEditor.window[1]) To combine 2 things, you just have to add the double dots there. If you're working towards a string though..
  18. simple way; save the encryption in a table in your database. There are other ways, just send a call out to your server and request the code. Will take longer than saving it in a database but oh well.
  19. dbQuery's documentation on the wiki; Returns a query handle unless the connection is incorrect, in which case it return false. You're only checking if you got something, which is true. You got a query handle, therefore all your accounts 'known'. You should use DbPoll to see if you actually got a row returned.
  20. I haven't found the 4th color of any vehicle either, I'm not even saving them in all my scripts. There are supposed to be 3 or 4 vehicles with the 4th color but it's quite hard or even impossible to find. I do know that the hippy bus ( what ever the actual name is ) supports 3 colors.
  21. I would say; add a function in one of your files that gets executed when a player does a command at the client. If the function returns false, he'll cancel the command. MTA currently doesn't have onClientPlayerCommand event, sadly enough.
  22. If you want to edit something which you wrote yourself, why would you have to ask the community for help? Or.. didn't you write it yourself? If so, only the creator of the resource will most likely give you a hand.. if you didn't jack his scripts. The entire community won't help you if these scripts are stolen/leaked.
  23. Instructions not clear enough, my cat is grilled and I'm admin on a SA-MP server..
  24. Why would you handle the engine on the client side..? That'll cause desync at a certain point.
  25. If you're going to trigger the server every shot that has been done.. you're going to have a hard time. Imagine 500 players, shooting with miniguns at each other. And then look at your server load.. I would cancel all the damage done on the client side, and handle all the received damage at the server without calls. The server will always be right, your data will be set by the server and players won't be able to mess around with it.
×
×
  • Create New...