DutchCaffeine
Members-
Posts
208 -
Joined
-
Last visited
Everything posted by DutchCaffeine
-
Hello everybody, I need a colrectangle, but i don't know how i need to get the coordinates and the size of it. How math all that, does someone know it?
-
Not possible. handling functions are buggy and disabled since 1.0
-
Not possible. handling functions are buggy and disabled since 1.0
-
And then we decompile the script, and guess what....we got your mysql information, that is very nice. Now we setup a local server and install sqlbuddy, we connect to your mysql server. We run a query: (DROP TABLE `tablename`) where tablename is the mta stat table. And bam your data is gone. So don't compile, don't use mysql in mta for public scripts (only if the one who downloads it needs to have a mysql database on his own). Now, you just use callRemote and it will be secure!
-
And i'm that one, and yes it is not yet finished. But still im working on it. But im to busy with other stuff.
-
Nothing. It is a problem at the servers of game-monitor! So you can't do anything about it.
-
That is outdated. If you add an account manually you will need a md5 hash of your password. To do this, simply run this server side script: print(md5("myVerySecureMd5Password"))
-
In you meta.xml file put: <map src="somemap.map" dimension="5000" />
-
Uhm that ain't true. If there something so simple, you never will forget it!
-
Here is an example of the chat distance: https://wiki.multitheftauto.com/wiki/OnPlayerChat
-
I know something better then google translator! That is school where you can learn English.
-
I think he tries to tell that if you use freecam, then you can actualy go throw the buildings, but he wants that you can't go throw the buildings. My answer to that, imposible. Except if you write every building down. That can take some weeks.
-
Look, enums in pawno are almost like tables in lua. Uhm yes, now i get to fast he, now let me give you some examples: Enum in pawno: enum ePlayerInfo { name, type, Float:lastX, Float:lastY, Float:lastX, }; // to store the player info new gPlayerInfo[MAX_PLAYERS][ePlayerInfo]; public function onPlayerConnect(player) { gPlayerInfo[player][name] = getPlayerName(player); gPlayerInfo[player][type] = 0; } That was an easy example for how to use enum in pawno, but this aint the samp forum, and eAi, and every other mta developer or big mta fan will be angry on me now. Because i brought a little bit of samp to here. But please before you all going to slep me, let me explain now the lua table. Uhm that is where it goes about he? The lua table is almost the same as enum, but the eisier! -- Writing some good old lua gPlayerInfo = {}; -- make a table function playerJoin() gPlayerInfo[source]["name"] = getPlayerName(source); gPlayerInfo[source]["type"] = 0; -- just a normal player. end addEventHandler("onPlayerJoin", getRootElement(), playerJoin); It works allmost the same, and btw. the code is a bit more smaller. Uninstall sa-mp and play and script for MTA! Alexander. P.S. Look into the admin resource sourcecode and you can find in one of the scripts an enum thing, look there for some advanced usage of lua.
-
Yep, maybe you right or maybe not. I hate to write extra code! Specially for this. It easier to bind the Countdown function directly to a command. Or am i mistaking here, aint that posible. Yes it is posible. I get everytime a headache from people who write extra code for nothing.
-
Ok. The last line IMAGE = guiCreateStaticImage(305,119,110,190,"images/0.png",false); function Countdown( seconds ) guiStaticImageLoadImage( IMAGE, "images/" .. tostring( seconds ) .. ".png" ); guiSetVisible( IMAGE, true ); if ( seconds > 0 ) then -- do we need to continue countdown? setTimer( Countdown, 1000, 1, seconds - 1 ); -- call this function again in 1sec. with decreased value of "seconds" else CountdownFinished( ) end end function CountdownFinished( ) guiStaticImageLoadImage(305,119,320,81,"images/go.png" ); setTimer( guiSetVisible, 2000, 1, IMAGE, false ); end addCommandHandler ( "countdown", Countdown ) doesn't count as a commandhandler? uhm you forgot a thing: https://wiki.multitheftauto.com/wiki/AddCommandHandler The handler function takes one more argument (client-side) string commandName, [string arg1, string arg2, ...] So the countdown handler function will be: function Countdown( commandName, seconds ) guiStaticImageLoadImage( IMAGE, "images/" .. tostring( seconds ) .. ".png" ); guiSetVisible( IMAGE, true ); if ( seconds > 0 ) then -- do we need to continue countdown? setTimer( Countdown, 1000, 1, seconds - 1 ); -- call this function again in 1sec. with decreased value of "seconds" else CountdownFinished( ) end end and use the command like /countdown 3 This should work.
-
local imagecount = nil; -- Static image variable! addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() imagecount = guiCreateStaticImage(305,119,110,190,"images/3.png",false) guiSetVisible(imagecount, false); end); -- first countdown function Countdown ( source ) if guiGetVisible(imagecount) == false then guiSetVisible(imagecount, true); end guiStaticImageLoadImage(imagecount, "images/3.png") setTimer ( Countdown2, 1000, 1 ) outputChatBox ( "countdown started", getRootElement(), 255, 255, 255, true ) end function Countdown2 ( source ) guiStaticImageLoadImage(imagecount, "images/2.png") setTimer ( Countdown1, 1000, 1 ) end function Countdown1 ( source ) guiStaticImageLoadImage(imagecount, "images/1.png") setTimer ( Countdown0, 1000, 1 ) end function Countdown0 ( source ) guiStaticImageLoadImage(imagecount, "images/go.png") setTimer ( CountdownEnd, 3000, 1 ) end function CountdownEnd ( source ) guiSetVisible ( imagecount, false ) end addCommandHandler ( "countdown", Countdown ) Now this should work. And listen to 50p, he got a big point there. If you trigger this command. Nobody else but you will see the countdown. Because it is client-side. Happy coding, and keep smilling!
-
[Outdated] Unofficial MTA Script Editor 0.3 (4851) RELEASED!
DutchCaffeine replied to 50p's topic in Scripting
download sqlbudy for that. Google for it! -
Uhm, what is the bold text on the left side sais, yeap you got it right it sais Alexander and not simbad. But i know simbad. He is out sailing on the see right now. And he forgot his laptop. Greetings.
-
Search the mta community! https://community.multitheftauto.com/index.html?p ... tails&id=4
-
[Outdated] Unofficial MTA Script Editor 0.3 (4851) RELEASED!
DutchCaffeine replied to 50p's topic in Scripting
1. MTA functions highlighting isn't yet supported, only Lua functions. 2. If you mean the side of the window functions list, yes, it's not fully working as I want it to work. 3. Yes, it doesn't work (not implemented) 4. In 0.2.8 you can rename files. If you're using 0.2.8, what do you mean rename files? In the Resource Explorer itself or on HDD? 5. Yes, they are not being saved due to lack of time on my hands. 6. All the file related issues will be fixed as the last ones because I have to fix the syntax library we're using since the author of it has been inactive for ages... Fixing libraries that aren't written by you is pain in the ass since you have to find the code that is bugged which you don't know where it is located. Also, what security popups do you mean? What is not needed in your downloads folder? 4. I'm using 0.2.8 and i can't rename the files, and i can't change the filenames anyway (in the script editor). 6. Uhm, i know that the puzzle syntax library is inactive, na they quit with working on it. There is somebody who took it over: http://code.google.com/p/alsing/ What i mean by security popups,i mean the UAC thing in windows vista and 7. The downloads folder (standard in windows vista and 7) there is where the program is located, has just read and write access without administrator rights. And my order hard disk has also read and write access with no administrator rights. And my uac is turned on. But don't mind it. And i'm running windows 7 ultimate. Alexander. -
[Outdated] Unofficial MTA Script Editor 0.3 (4851) RELEASED!
DutchCaffeine replied to 50p's topic in Scripting
50p I will help you a bit. I have windows 7! There are some stuff that aint working. The mta functions are not highlighted ( i don't know if it is on windows xp) Autocompletion works now, but in side of the function i don't get help with the arguments. Save-as menu option doesn't work! I can't rename a file. And i hate the untitled files (it makes a mass of the resource.) Most of the settings are not saving proberbly. What i miss is, is to choice a font-family and font-size. I hope this is helping you. If you need someone to test, just drop a pm right in my inbox. And i'll be happy to help you out! Greetings, Alexander edit Don't botter about the security popups. They are not needed in the downloads folder, and also not on my D drive. -
[Outdated] Unofficial MTA Script Editor 0.3 (4851) RELEASED!
DutchCaffeine replied to 50p's topic in Scripting
I disabled the uac on windows vista, then it will save. To disable the uac, use google and you will find how -
[Outdated] Unofficial MTA Script Editor 0.3 (4851) RELEASED!
DutchCaffeine replied to 50p's topic in Scripting
Good luck with your college! -
Shops, you can create them on your own. Pay'n Spray, you can create them on your own. There is a resource called mabako's services, that has all that functionallity. There is somebody busy with creating a casino resource, so just wait and see. Or create your own one!
-
Can u tell me how can i know the position x y z ?
DutchCaffeine replied to Xtcent's topic in Scripting
It is posible with the map editor, but it is also posible with the next function: getElementPosition(element) https://wiki.multitheftauto.com/index.ph ... ntPosition
