-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
If you're not giving the code, you'll need to figure it out yourself, the problem says; no points when someone wins, 1st thing to do; Look at the event example: onPlayerWin (or how it might be called).
-
https://forum.multitheftauto.com/viewtopic.php?f=91&t=58704 https://forum.multitheftauto.com/viewtopic.php?f=91&t=64531 perhaps this helps. The error message #1006, which is "Destination IP not allowed" according to the wiki.
-
Yes, I'm aware of it, many players request SQL and it's something great I can use except I need to learn it first.
-
You're using stuff from other languages here such as "//" that's "--" in LUA, There's no need for Semi-colomns ";" and is this your full code? because you're missing the function start and end's also the curly brackets aren't in LUA "{" "}", Example of a code C# compaired with LUA. // C# Example public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } } -- LUA Example function Hello1 () outputChatBox("Hello, World!") end addEventHandler("onPlayerLogin", getRootElement(), Hello1) + ALSO NOTE: MoveObject PlayerToPoint Stuff like this always start with a lowercase. moveObject, etc. Take a look on the wiki for all the functions and events. Server Functions: https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions Server Events: https://wiki.multitheftauto.com/wiki/Server_Scripting_Events Client Functions: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions Client Events: https://wiki.multitheftauto.com/wiki/Client_Scripting_Events BTW learn yourself don't use codes you don't understand and look if it's the right game, SAMP and MTA are different. http://forum.sa-mp.com/showthread.php?t=43930 I hope this helped, Regards Viruz
-
How about these events, are they usefull; OnClientCursorMove GetCursorPosition
-
I have a problem with markers and panels help me plis
ViRuZGamiing replied to Zero^^'s topic in Scripting
Try the Spanish forum perhaps. https://forum.multitheftauto.com/viewforum.php?f=117 -
Hi, How can I check if a vehicle is driving or not. I'm try to do a "getControlState" for all the controls (forward, reverse, left and right) but it's not working out quite well. Regards Viruz.
-
So you can't do tables in a "so claimed" own made script while it's using loops through the tables; Markers, vehicle_, blip, rand and ca3. Okay
-
I've made this already, could I use this to implement it into an XML, and I will take a look at the XML Functions. function saveYourCar (thePlayer) local vehicle = getPedOccupiedVehicle (thePlayer) if (vehicle == false) then outputChatBox("Your not in a vehicle") else local idData = getElementData(vehicle, "ID") local ownerData = getElementData(vehicle, "Owner") if (thePlayer == ownerData) then local vPX, vPY, vPZ = getElementPosition(vehicle) setElementData(thePlayer, "vehPositionX", vPX) setElementData(thePlayer, "vehPositionY", vPY) setElementData(thePlayer, "vehPositionZ", vPZ) outputChatBox("Position Saved!", thePlayer) else outputChatBox("This vehicle doesn't belong to you!", thePlayer) end end end addCommandHandler("save", saveYourCar)
-
I don't use databases, I know they're the best to use and it can be used in every script. XML seems quite hard, if I could get some basics going on XML I could try it. Are you known with XML?
-
Okay nice, it works great. I've attached the data Owner and ID to the bought vehicle. I've noticed that the Data goes away on resource restart, is it possible to keep it? Regards
-
Oh lol, it's just like C# Thx, i'll try it and let you know if I bump onto any problems
-
Hi guys, I'm trying to figure out the setElementData, i've read the wiki and now's my question. I want to assign some ElementData called ID to a vehicle (which would be possible for me) But! I want to do it like on the second car it needs to get the next ID + 1. Example: Vehicle Banshee bought! ID = 1 Next Vehicle! ID = 2 I hope you'll understand what I'm trying to say. Regards Viruz
-
I have a problem with markers and panels help me plis
ViRuZGamiing replied to Zero^^'s topic in Scripting
function createWindow () Window = guiCreateWindow (156, 103, 471, 441, "Departments LS", false) guiWindowSetSizable (Window, false) guiWindowSetMovable (Window, false) guiSetVisible (Window, false) image = guiCreateStaticImage (18, 28, 434, 243, "guieditor/images/examples/mta-screen_2014-12-03_19-39-00.png", false, Window) text = guiCreateMemo (18, 282, 434, 123, "Tired of living in the street? Well, I have an answer for it.\n \nCompra a department Departments LS and you can make your dream come true. \n \n¡Solo for $ 25,000 you can get a home! ", false, Window) guiMemoSetReadOnly (text, true) button = guiCreateButton (348, 410, 104, 21, "Close", false, Window) guiSetProperty (button, "NormalTextColour", "FFAAAAAA") AddEventHandler ("onClientGUIClick" button, SalirFuncion, false) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), createWindow) function SalirFuncion () showCursor (false) guiSetVisible (Window, false) end -- IF it needs to be opened by the marker use this full code, else the below part can be removed. function abiertoFuncion () guiSetVisible(Window, true) showCursor (true) end addEvent("abiertoEvent", true) addEventHandler("abiertoEvent", getRootElement(), abiertoEvent) -- SERVER SIDE markerinicio = createMarker (2176, -1763, 13, "cylinder", 1, 0, 0, 255, 255) function abiertoServerFuncion (thePlayer) triggerClientEvent("abiertoEvent", thePlayer) end addEventHandler("onMarkerHit", markerinicio, abiertoServerFuncion) Didn't test it, made it quickly while on a school computer but I can't test here without MTA. I hope it works for you, take a look at it because there are many mistake on writing your declaration on the wrong side. Learn from this, Regards Viruz -
Not that I know of, you could ofcourse use all the basic textures and load them as a script but I could create some lagg.
-
Define "Multi Camera"
-
isElementInWater() use this too + EDIT: Open this script https://community.multitheftauto.com/index.php?p= ... s&id=10020 Read it, learn from it, make it better as your own.
-
function fCancelEvent() -- if you are in a submarine cancelEvent () -- if end end addEventHandler ( "onClientPlayerDamage", getRootElement(), fCancelEvent ) Use this to not die underwater when in a submarine, for the rest you can create your own bindKey and make new controls but I don't know if there's a way to cancel the water physics holding you from going underwater.
-
attempt to index global 'elementBackpack' (a nil value)
ViRuZGamiing replied to Tycka's topic in Scripting
Yes but we can just stop replying on them instead of starting to flame, etc. -
attempt to index global 'elementBackpack' (a nil value)
ViRuZGamiing replied to Tycka's topic in Scripting
Perhaps try being a bit friendlier to those who are people on the forum, @A Concerned Citizen Because I see all your replies and they all say the same, 'go to the wiki we don't help you'. If Sasu wants to help someone he can do that, that's polite. If you don't want/can't help then don't reply pls. Anyway keep on the good work Sasu, I remember you from waaaay back on the forum. -
Make a script that onPlayerQuit saves the position, skin, etc. (all you need) and when he Joins or Reconnects. onPlayerJoin/onPlayerReconnect set the skin and all those things you've saved. and remove the only player join in the spawn menu and make it onPlayerRegister so people can spawn onPlayerLogin. much easier. anyway we're here to help you develop it, not create it for you.
-
Function is created after the handler, the handler does not know of the creation of the function. Solution, place the handler below the function
-
Try this; function languageCmd(player, cmd, language) if cmd == "setlanguage" then language = tostring(language) if language then -- set player language else outputChatBox("[usage] /setlanguage [language]", player) end else outputChatBox("[usage] /setlanguage [language]", player) end end addCommandHandler("setlanguage", languageCmd) Not tested, never used the command with extra parameters but this is what I understand of it.
-
I've made a video with a new update which is not released yet do you guys want it or not, any improvements, reply your ideas!
-
Errors and debug?
