-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
I'm glad it worked :> Good luck.
-
That number represents the flags. If you convert that number to hexadecimal number you will get 0x4000001. Each of the bytes of the number represent 4 flags, as explained here: http://projectcerbera.com/gta/sa/tutorials/handling All you need to do is check if the flag is set by using bitAnd function. I haven't tested this but you can do that and try if it works: local gHandlingFlags = { _1G_BOOST = 0x1, _2G_BOOST = 0x2, NPC_ANTI_ROLL = 0x4, NPC_NEUTRAL_HANDL = 0x8, NO_HANDBRAKE = 0x10, STEER_REARWHEELS = 0x20, HB_REARWHEEL_STEER = 0x40, ALT_STEER_OPT = 0x80, WHEEL_F_NARROW2 = 0x100, WHEEL_F_NARROW = 0x200, WHEEL_F_WIDE = 0x400, WHEEL_F_WIDE2 = 0x800, WHEEL_R_NARROW2 = 0x1000, WHEEL_R_NARROW = 0x2000, WHEEL_R_WIDE = 0x4000, WHEEL_R_WIDE2 = 0x8000, HYDRAULIC_GEOM = 0x10000, HYDRAULIC_INST = 0x20000, HYDRAULIC_NONE = 0x40000, NOS_INST = 0x80000, OFFROAD_ABILITY = 0x100000, OFFROAD_ABILITY2 = 0x200000, HALOGEN_LIGHTS = 0x400000, PROC_REARWHEEL_1ST = 0x800000, USE_MAXSP_LIMIT = 0x1000000, LOW_RIDER = 0x2000000, STREET_RACER = 0x4000000, --UNDEFINED = 0x8000000, SWINGING_CHASSIS = 0x10000000 }; function isFlagSet( val, flag ) return (bitAnd( val, flag ) == flag) end function getVehicleHandlingFlags( vehicle ) local retFlags = { }; local flags = getVehicleHandling( vehicle )["handlingFlags"]; for name, flag in pairs( gHandlingFlags ) do if isFlagSet( flags, flag ) then retFlags[ name ] = true; end end return retFlags; end You can use my function getVehicleHandlingFlags which will return a table of the flags, eg: local handlingFlags = getVehicleHandlingFlags( getPedOccupiedVehicle( localPlayer ) ); for name in pairs( handlingFlags ) do outputChatBox( "Flag set: " .. name ); end If you don't want to loop and check if specific flag is set, you can use my other function isFlagSet: local handlingFlags = getVehicleHandling( localPlayer )["handlingFlags"]; -- standard value, like your example: 67108865 if isFlagSet( handlingFlags, gHandlingFlags.STREET_RACER ) then -- use the table (gHandlingFlags) provided with predefined flag names outputChatBox( "You can mod your car at Wheel Arch Angels." ); end As I explained above: 67108865 == 0x4000001 Check the table gHandlingFlags and find: 0x4000000, it'll be -> STREET_RACER Check the table again and find: 0x1, it'll be -> _1G_BOOST I hope it works and you understood how it works.
-
Check the vehicle's components and see if you can find any component's name that could be the door: getVehicleComponents
-
If the door is a part of the model it may be counted as "component". If it is, then you can use setVehicleComponentRotation to open the door.
-
You can use this function with anything you want.
-
@Kiddnapper, You have created the same sort of topic multiple times: viewtopic.php?f=91&t=69222 viewtopic.php?f=91&t=66048 viewtopic.php?f=5&t=65859 If you carry on creating same topics, you will be given a warning. Thank you for cooperation.
-
createPed does NOT return coords of where it was created. Also, always check the debug window and I'm sure you will find the answer to most of your questions.
-
So there isn't a need for the variable 'server'? You will need the server variable if you want to query the database later on but you don't need other vars if you don't even use them.
-
Why don't you try? Looks fine to me. BTW, I don't see any reason why you need to declare new variables if you don't even use them.
-
Triple posting is not acceptable. Use Edit button next time please. Thank you.
-
You can't play sounds server-side. Your code is wrong. - localPlayer is a variable not a function. - There is no getPlayerPosition function. Use getElementPosition instead. - What's the need for new event?
-
I tried adding an all privileged account, name = lloyd and pass = mtaserver, but still the same But you don't seem to be sending it when you call dbConnetc.
-
Explain the need for triggerServerEvent? You can bindKey server-side.
-
As far as I know you can't walk on attached elements because once attached their collision data is lost. Besides, attached elements to the player will follow the player, so if player's in the water, the element is under water with them.
-
If you want to change the image color, you need to use dxDrawImage instead.
-
Ask yourself how much you know about scripting? Then ask yourself if you can start scripting? Then try and start working on it, come back here if you get any problems with your code and we can help you out. Until then, you need to read about Lua and MTA scripting. Start here: https://wiki.multitheftauto.com/ http://www.lua.org/manual/5.1/ https://wiki.multitheftauto.com/wiki/Sc ... troduction
-
The last example: https://wiki.multitheftauto.com/wiki/RemoveWorldModel
-
Yes. But first you need access to MySQL where your forum data is stored and the MySQL database needs to accept connections from remote servers/clients. Some hosts block the connections to the database from servers other than the server hosting the database. It's simple to do once you have your forum set up. Then all you need to do is create a simple resource which will connect to that MySQL and query it for username and password.
-
and what functions for this? setWeaponProperty
-
Why not set weapon's property to use 1st person view (like Sniper rifle or RPGs)? That and an image of first person weapon would make it look like in COD or better yet create a temporary weapon model in front of the camera but this would require more maths to calculate weapon's rotation.
-
I'm pretty sure it's been made in the past. Search the community site.