
DutchCaffeine
Members-
Posts
208 -
Joined
-
Last visited
Everything posted by DutchCaffeine
-
better do: function logedin(thePlayer) -- Do something here you always want to do. end addEventHandler("onClientLogin", getResourceRootElement(getThisResource()), logedin) Tip use always English in a program file, it will be cleaner and better to understand. Why i'm using 'getResourceRootElement(getThisResource())' Easy, if you start up an other resource in game, it won't call the function of the event. Why o why. onClientLogin is totally irrelevant on which resource was it fired on. It's not onResourceStart there, it's onClientLogin. OOps true..... Uhm, can you explain your problem better.?
-
better do: function logedin(thePlayer) -- Do something here you always want to do. end addEventHandler("onClientLogin", getResourceRootElement(getThisResource()), logedin) Tip use always English in a program file, it will be cleaner and better to understand. Why i'm using 'getResourceRootElement(getThisResource())' Easy, if you start up an other resource in game, it won't call the function of the event.
-
In the GTA Ultimate (LC2SA and VC2SA) do you have the normal gta world, and the liberty city world, and the vice city world... If they did add extra objects, how to do this in MTA? Not possible.
-
Yep, it exists. And also a decompiler But if you still want it now, folow the next links: https://forum.multitheftauto.com/viewtop ... 91&t=24614 http://www.google.nl/search?q=lua+compi ... =firefox-a
-
[REL] Kapil's Instant House Construction - [KIHC 0.1.61]
DutchCaffeine replied to Kapil's topic in Resources
I can look into it, but it is up to Kapil to fix it -
I don't really know but there is a way to connect to the internet. Maybe if you make an application in php, that can send the form data etc. to mta. Then there is a good possibility! http://development.mtasa.com/index.php?title=CallRemote
-
[REL] Kapil's Instant House Construction - [KIHC 0.1.61]
DutchCaffeine replied to Kapil's topic in Resources
Heey Jammie, Little bit of script debuging, the error: attemt to call global '***' (a nil value). This error means that the function or an variable doesn't exists. My tip is try to redownload this system, and put it again in your resource folder and test it. Maybe it'll help. -
I just going to get rid of the mvc pattern. And with a better ped walking package i mean: local myPed = Ped:Create(0.0, 0.0, 0.0, 0); -- x, y, z, skin addCommandHandler("gopedgo", function(cmd) myPed:walkTo(2.5, 0.0, 0.0, 2.0); -- x, y, z, speed -- Or just load an ped file where you declare every position where the ped will walk to. myPed:loadFromFile("myPed.xml"); end); The .xml file <?xml version="1.0" encoding="UTF-8"?> <ped> <walkto>x, y, z, speed</walkto> </ped> This is just what i have in mind, the ped package is not yet created.
-
The target version is 1.0. And maybe you right about that language system. I going to think about it. I don't want a meta file that is so big that you need to wait ours to upload to an server.
-
Ahhhhh don't put it in the meta file. That is a mess. Take a look in this class: http://code.google.com/p/mtaframework/s ... parser.lua I ain't using the meta file to parse these files.
-
I hate that idea about the language table. If you got hundreds of words to translate, really you want to put it into separate files. You got an couple of points their, the example was something i had in mind to do it that way, but really it can be easier. And this doesn't go about some function rewrites. No sorry bob, it will add some more features to MTA. For example the ped package, you can let a pad walk with a couple of functions and some coords. I will update my very first post later, when i got more code. And about the name, i can't think of an other name. But you got a point there it ain't a part of MTA, but it is for MTA. I keep this name as a dev. name. I will think about it later. But today i got some more important things to do, like discovering Adobe Stratus. Alexander de Jong
-
It is really simple to create images, uhm show images in mta. The next function will show how: GuiCreateStaticImage
-
_50p, That is the idea around the framework.
-
True. But what i have in mind creates it simpler that that example code on the wiki. It is an MVC pattern based resource. It will be allot easier when it is finished.
-
It is an resource. And that peace of code you showed it is work in progress. The event package is not yet finished. I'm busy with it.
-
Hello scripters and server owners, Today i started with the MTA Framework, some of you may noticed it on the wiki. About About the MTA Framework. I started this project to make it easier to create an server. This framework is based on a MVC pattern, why it is based on an MVC pattern. Uhm i just like that pattern. Also this project is OOP based. Become a developer If you want to be a part of this framework, you may send your information (e.g. scripting knowledge, couple of examples and something about you) to Alexander. Also bear in mind that our project is stored on google code. So you need an google account in other to contribute to our svn. Links Google code page: http://code.google.com/p/mtaframework/ Wiki page: https://wiki.multitheftauto.com/index.ph ... _Framework If you have questions or anything else. Just reply to this topic. And i will try to answer them. Alexander de Jong
-
[REL] ClientLuaConverter - protect your script!
DutchCaffeine replied to robhol's topic in Resources
For windows vista users, run this application in administrator mode. If you don't do it, it won't completely work. -
Oww, so you can also use a gif image. I should test that one out. But look png are bigger files then, jpeg/jpg. That is better for the client, less download.
-
huh, since when is jpg also suported. i though that you can use only png.
-
try to use the search option on this forum. I see that you ask questions that are already asked. And please read everything on wiki. (development.mtasa.com).
-
That aint going to work. variable++; -- is like php. variable = variable + 1; -- That is lua.
-
Mister, What you do here is wrong, real wrong. Let me explain; staticImageLoadImage = This reloads an image that you have created with createStaticImage. It is real simple: local image = nil function showClientImage() -- Image 0 should be the fists (i guess) image = guiCreateStaticImage( 795, 35, 75, 100, "Hud_ammo/0.png", false ) -- This creates the image. Standard 0 cuz that is the fist end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), showClientImage ) That is onClientResourceStart. You dont need to load every image. That can crash the client i guess. Now how to change the weapon. That is real simple function showClientImage ( prevSlot, newSlot ) local weaponID = getPlayerWeapon( getLocalPlayer(), newSlot); guiStaticImageLoadImage( image, "Hud_ammo/".. tostring( weaponID ) ..".png" ); end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), showClientImage )
-
50p shows also a very good example. Example for buttons: function buildMyWindow() local window = guiCreateWindow(x, y, w, h, title, relative); local btn = guiCreateButton(x, y, w, h, title, relative); addEventHandler("onClientGUIClick", btn, btnClick, false); -- See i don't use getRootElement but i use the button element. end function btnClick(button) outputChatBox("my button is clicked YEEHAA", getLocalPlayer()); end
-
The addEventHandler can be anywhere in your script, example: function pEnter(player) print(tostring(player) .. " entered vehicle: " .. tostring(source)); end function rStart() -- this can here addEventHandler("onPlayerEnterVehicle", getRootElement(), pEnter); end -- and here addEventHandler("onPlayerEnterVehicle", getRootElement(), pEnter); addEventHandler("onResourceStart", getRootElement(), rStart);
-
It are gui animations. Not player animations.