myonlake
Members-
Posts
2,312 -
Joined
-
Days Won
40
Everything posted by myonlake
-
That script doesn't make much sense where you compare the vehicle type. You're also repeating a lot of code, which isn't good. Try this. Not tested. function JoinVehicleCar(player, seat) if (seat == 0) then local accountName = getAccountName(getPlayerAccount(player)) local hasAccess = true if (getVehicleType(source) == "Automobile") or (getVehicleType(source) == "Bike") then hasAccess = accountName and isObjectInACLGroup("user." .. accountName, aclGetGroup("HABCARMOTO")) elseif (getVehicleType(source) == "Helicopter") or (getVehicleType(source) == "Plane") then hasAccess = accountName and isObjectInACLGroup("user." .. accountName, aclGetGroup("HABAERO")) elseif (getVehicleType(source) == "Boat") then hasAccess = accountName and isObjectInACLGroup("user." .. accountName, aclGetGroup("HABBOAT")) end if (not hasAccess) then cancelEvent() outputChatBox("#000000[ #FFFF00CNH#000000 ] #FFFFFFVocê não possui #ff0000Habilitação #ffffff para conduzir este veiculo!", player, 255, 255, 255, true) end end end addEventHandler("onVehicleStartEnter", root, JoinVehicleCar)
-
There's a couple ways you can do that as far as I know: a) Attach the object to the player element and try to figure out the rotation in a render loop. b) Create a custom weapon, which you need to also manually attach for the player element. The way you are trying to do it right now is not possible since a ped weapon is not an element.
-
Wiki page for getElementData says the following: Meaning, that in this case theVehicle is missing fiyat element data. Make sure you have it set.
-
Don't bump your forum posts while they're still 7 hours old. You can use onClientClick to check if a mouse button is pressed down, which allows you to then move around an item on the screen using getCursorPosition in conjunction with onClientRender. To stop moving, you can again use the same onClientClick event to determine when the mouse button is up so you can stop rendering the movement.
-
You can always try renaming your MTA San Andreas 1.5/mods/deathmatch/resources folder name to something else temporarily and have it download everything again. That'll clear the local cache. As for it downloading everytime even if you manage to get on the server, it might mean caching is disabled.
-
Indeed, and usually people don't move from server to the other either. People like to stick with what they have because you can't bring it with you (this includes exclusive server features and communities). I've seen it happen a lot, been a part of the mass move a few times and seen how it works. It is possible to get people to move, but it will not be easy. You need a lot of people to support you first, hence having good contacts on active servers who are willing to support your server are almost crucial.
-
That's also a valid point. Time is a common problem when you want to start up a server. Spinning up a server is easy, but developing it while it's up is not so easy if you have other things to do and no other trustworthy developers. Welp, good luck with your new project.
- 12 replies
-
- new
- mindblowing
- (and 10 more)
-
Oops, seems like my phone was doing something weird, it looked like random words all through the post. Nevermind for that
- 8 replies
-
- elementdata
- events
-
(and 1 more)
Tagged with:
-
You made my day. Sadly, your Google translation is unfortunately too obvious. I suggest you post the tutorial in your language to your language section so it can reach the right audience...
- 8 replies
-
- elementdata
- events
-
(and 1 more)
Tagged with:
-
So I guess it failed? Or are you still trying to open the forums?
-
Good luck! I always liked freeroam, used to run one myself a long time ago as well. Have fun!
-
Roleplay servers are not worth it as there is very little hope for stable new playerbase. People want to play, not switch servers. I've seen it happen so many times these past 7 years you don't even believe it.
- 12 replies
-
- new
- mindblowing
- (and 10 more)
-
No. You need to make a new timer. Completely separate from the other one. addEventHandler( "onResourceStart", resourceRoot, function( ) setTimer( function( ) -- Function to execute -- Put the code in here end, 1000 * 60 * 5, -- Time in milliseconds (5 minutes) 0 -- Times to repeat (0 = forever) ) end )
-
You should make a timer using setTimer and then have that set to 1000 * 60 * 5 so it runs every 5 minutes. In there you can basically just copy paste the code from the manual respawn script like so: local vehicles = getElementsByType( "vehicle" ) for i, v in ipairs( vehicles ) do local _, occupant = next( getVehicleOccupants( v ) ) if ( not occupant ) then respawnVehicle( v ) end end
-
I don't know but the OP specifically asked to add more, not replace. You can add more, but it requires so much time it would be ridiculous to even do something like that. Just because you could theoretically render every pixel if you had to, doesn't mean you should. There's a more simple way, which is that they add native support for things like that. So, no, unless the OP wants to switch back to replacing things (which is significantly easier, but still super hard considering the physics engine).
-
Sure. You can do it. You end up rewriting the whole vehicle core code to Lua. That's the most horrible idea I've ever heard on MTA.
-
You're welcome.
-
Logo resource, as you want it to have lower priority than the background images.
-
Right. addEventHandler( "onClientRender", root, myFunction, true, "low" ) -- For your logo
-
Use addEventHandler's priority parameter on your onClientRender events. That way you'll be able to render the images from different resources in the right order.
-
Well, the script doesn't make any sense. What do you want to do exactly? Projectile is created You create a new colshape sphere at where it's spawned and save the colshape to g_Rockets with the creator... twice (source = creator) The projectile hits the colshape (which it already is in, I don't even know how it even triggers the event, lol) You get the current active weapon of g_Me (which I recall is getLocalPlayer();) You check if that weapon returns something (it always returns a number value, lol) You check if the colshape exists in g_Rockets You check if the hitElement matches the weapon ... id... .. uh, what? Then you check if the projectile creator doesn't match the weapon id..... why? Then you kill a timer, and you create another timer. And you do absolutely nothing with the getProjectileCreator. I don't understand your code... at all.