-
Posts
2,973 -
Joined
-
Last visited
-
Days Won
3
Everything posted by 50p
-
1. Yes, .png files work with transparency and so does dxDrawImage. 2. No, every DirectX drawing function needs to be used every frame. Alternatively, you can create background rectangle with GUI function (guiCreateStaticImage) which will be displayed until guiSetVisible is called to hide it. 3. You should set it to 0 unless you want to get some effects like this: https://community.multitheftauto.com/index.php?p= ... ils&id=427 I change gauge colour based on time.
-
It is hard. What did you expect? There was some rope code implemented in MTA but it was never finished or it was buggy when I last looked into MTA source code.
-
The script is fine. I've never seen such error message before. This errors has got something to do with downloading your client-side script file. Unfortunately, "response code said error" doesn't say much... Join our IRC channel and speak to someone who's up-to-date with the source code and ask them where does this message come up and what could be a reason.
-
Try not to use "host server" from MTA client. Run "MTA Server.exe" instead.
-
Do you use external HTTP server to download resource?
-
If a player is not connected you will not get player element from nowhere.
-
addEventHandler( "onPlayerWasted", getRootElement( ), function( ) setElementData( source, "wantedlevelB4death", getPlayerWantedLevel( source ), false ); end ) addEventHandler( "onPlayerSpawn", getRootElement( ), function( ) local wantedlevel = getElementData( source, "wantedlevelB4death" ); if wantedlevel and wantedlevel > 0 then setPlayerWantedLevel( source, wantedlevel ); end end ) But as I said try. Not sure if it'll work since I'm not sure if level is set back to 0 after all event handlers are executed or just before event is triggered.
-
You can try and set it back to what player's wanted level was before they died.
-
I've just looked in MTA:SE and found out there is no setFreecamEnabled server-side exported function from freecam resource. Use setPlayerFreecamEnabled function instead.
-
None of the engine functions work well and there is no theory that fixes them, they either work or not. You may have many problems with them all the time. The most annoying thing is white skin which has no texture loaded at all. Try to spawn player once he's downloaded and replaced his skin texture (onClientResourceStart) or change his skin ID once he's texture was changed (yes, the same ID that he spawned with).
-
I haven't heard of any script converter (pwn -> lua) yet. The amx you've seen is not a converter but an "emulator". It can run SA-MP scripts but it's much much slower than using Lua alone because when an event occurs, amx module calls a samp function which than has to be emulated and executed as Lua code.
-
https://wiki.multitheftauto.com/wiki/ACL
-
This should work with all vehicles even with those created with admin panel. I've noticed it doesn't always destroy vehicles.
-
outputChatBox is one of those functions which works like it should with element tree. I'm not 100% sure if setPlayerTeam changes their parent as well but if it does, you should be able to send message to team element, for instance: outputChatBox( "hello blue team", getTeamFromName( "Blue" ) ) If that doesn't work, you can set player's parent to team element and then it should work but if that doesn't work, the worst case is to getPlayersInTeam and loop through them.
-
Depends how your script works. Show us your script that destroys the vehicles and we'll tell you then.
-
I thought about that, while browsing the amx resource. Can plugins be streamed like any resource, or must be installed manually? What do you mean "streamed like any resource"? Plugin/addon/module must be installed manually just like resources. Put them in "modules" folder and add its name into mtaserver.conf
-
No. Although, you can always make a plugin/addon.
-
Then no, if you're using a timer in onVehicleExplode.
-
There would be if https://wiki.multitheftauto.com/wiki/Set ... spawnDelay worked. If it works, then, well, you've got what you wanted.
-
MTA Race is no longer supported here. Not many people use it now anyway. Download MTA DM 1.0.2
-
https://forum.multitheftauto.com/viewtop ... 91&t=25032 https://wiki.multitheftauto.com/wiki/Main_Page https://wiki.multitheftauto.com/wiki/Scr ... troduction I'm in a rush.. all I can say is READ wik and LEARN Lua. You come here from space asking for something that is too hard for you without much scripting knowledge. I assure you, spend a few days on reading and learning and you'll become much better scripter who can script a lot because Lua is very easy to learn especially if you have good resource (which you have). - https://wiki.multitheftauto.com/wiki/OnVehicleExit - to start timer to destroy vehicle - https://wiki.multitheftauto.com/wiki/OnVehicleEnter - to stop the timer if running already to prevent from destroying vehicle when player is inside - https://wiki.multitheftauto.com/wiki/SetTimer - to start timer - https://wiki.multitheftauto.com/wiki/DestroyElement - to "destroy" vehicle element (get rid of vehicle from the server) - https://wiki.multitheftauto.com/wiki/SetElementHealth - if you don't want to remove vehicle from server, use this to change vehicles health to 0 to explode it
-
Work on it once you get home. You're at school for a reason! If you're working on your own RPG than you shouldn't use other resources, especially freeroam-like resources which handle many tasks for you.. Basically, create your own resources and use them instead because you'll keep asking where to remove this and that to make that resource to work the way you want.. I would not recommend you to write RPG straight away because you just don't have enough knowledge for it and you even admitted it in another topic saying "i'm like a junior scripter".
