-
Posts
60 -
Joined
-
Last visited
Everything posted by SkittlesAreFalling
-
Upload Picture via. MTA web server.
SkittlesAreFalling replied to SkittlesAreFalling's topic in Scripting
I made a website resource, I want it so players can upload a picture on the website and the picture gets saved onto the website resource. -
Upload Picture via. MTA web server.
SkittlesAreFalling replied to SkittlesAreFalling's topic in Scripting
I already know how to do it with PHP, I'm wondering if it can be done with the MTA server. -
Hello, I am in the process of creating a custom website for my MTA server and I was wondering if it's possible for web clients to upload gallery photos to the web resource? Any example?
-
Prejudiced bastards.
-
I can help you by improving this type of system, it won't be hard and might be a learning experience for you. Skype: live:SkittlesAreFalling I just didn't like Anubhav is ripping on you when he's doing practically what you're doing. Hypocrisy.
-
*cough* viewtopic.php?f=108&t=82520 *cough*
-
These are easy to make, have to be a moron to not be able to make these.
-
[REL] Lunix OS Phone [Messenger, Notes, Music]
SkittlesAreFalling replied to AriosJentu's topic in Resources
Three Days Grace <3 -
If I can help in any way, I would absolutely love to <3
-
[SALE] Rectangular Radar with full source code and 3D ROT
SkittlesAreFalling replied to SxSzY's topic in Resources
Looks very clean, good luck! -
I can't connect: http://prntscr.com/4httos says I need to update but 'There is no available updates.' Fixed it, set: 1 to: 0
-
Title says everything. I don't understand why I cannot pass my function through the triggerEvent parameters: addEvent("TestEvent"); CreateTest = function() local Public = {}; local Private = {}; Private.String = "Hello world!"; Public.Test = function() outputDebugString(Private.String); end HandleTest(Public); triggerEvent("TestEvent", resourceRoot, Public); return Public; end HandleTest = function(Public) Public.Test(); -- Works. end addEventHandler( "TestEvent", root, function(Public) Public.Test(); -- This gives error that the field is nil. end ); Test = CreateTest(); Test.Test(); -- Works. I'd like to utilize Lua's class system with MTA's event system but the event system is preventing me from doing so.
-
120 isn't BAD, but if you want it shorter you could externally store buttons and whatnot into SQLite, removing them staticly and replacing them dynamically reduces lines of code A LOT. Find more efficient code, efficient code usually decreases the amount of lines used to write the code. You can do a lot to reduce coding.
-
I just copied and pasted the code you had and edited the problem I saw for you. As long as it's fixed now: outputChatBox("You gave #00FF00$"..tostring(amount).."#0096FF to #FFFFFF"..getPlayerName(targetplayer), player, 0, 81, 255, true);
-
But you cannot set a string with a number in Lua, you must convert the number to string: outputChatBox("You gave #00FF00$"..tostring(amount).."#0096FF to #FFFFFF"..getPlayerName(target)); Do not argue just test it before being naive.
-
Well we're not saying that it would work, we were saying you should test and experiment for yourself using different functions that are similar.
-
localPlayer or getLocalPlayer() instead of thePlayer
-
Do you have the ship's collision set properly? setElementCollisionsEnabled(Element, true); -- for both the player and object. You can edit the object collision manually and replace the .col file via. client. http://www.gtagarage.com/mods/show.php?id=1154 -- Collision editor. https://wiki.multitheftauto.com/wiki/EngineLoadCOL Post it here as a fix for us
-
Like "bandi94" said: "you need to use some position matrix , maybe adding soem offset's etc... and after that use : setPedLookAt , and other aim function's." Try setting the rotation to (TZ + 0.05) or even (TZ + 0.000005), small tinkers and experimenting until it's 100% perfect. I gave you a untested base, it wasn't going to work flawlessly the first test, you need to use your brain and the wiki. I can do it flawless but I am busy. Goodluck!
-
You can also bind them to "both" instead of two binds "up" and "down" Then in the function parameters (Key, KeyState) KeyState = "up" or "down" based on what they player did.
-
To get the target you can do a for loop with getElementsByType("player"): local X, Y, Z = 0.0, 0.0, 0.0; local TX, TY, TZ = 0.0, 0.0, 0.0; local ClosestPlayer = nil; local Distance = 999999.999999; local StreamedPlayers = {}; X, Y, Z = getElementPosition(getLocalPlayer() or source); StreamedPlayers = getElementsByType("player", getRootElement(), true); for Key, Value in ipairs(StreamedPlayers) do -- Value is the element. '/t' TX, TY, TZ= getElementPosition(Value); '/t' if(Distance > getDistanceBetweenPoints3D(X, Y, Z, TX, TY, TZ)) then '/t' '/t' ClosestPlayer = Value; '/t' '/t' Distance = getDistanceBetweenPoints3D(X, Y, Z, TX, TY, TZ); '/t' end end if(isElement(ClosestPlayer) and getElementType(ClosestPlayer) == "player") then '/t' TX, TY, TZ= getElementPosition(Value); -- Aiming code here. end '/t' - tab.
-
Use client-side scripting, bind the aim key, get the distance between the players to get the closest player, there's a useful function findRotation on the wiki, if you want it to lock onto the target (use a timer to determine if the player is still close to the target and keep setting rotation to that target), if you want it to bounce to the closest player always (use the timer to determine who's the closest player and set rotation towards the closest player). For the health arrows I'm sure you will find a way, I'm not too experienced in that subject but I am learning.
