Mizudori
-
Posts
75 -
Joined
-
Last visited
Posts posted by Mizudori
-
-
It checks if the element which hits col shape is player or vehicle .
He is talking about this.
-
iam begainner in sql not scripting so i have created a atm script and i want to finish and as i finish with your help i will also learn.
So if you are not begginer in scripting go to https://community.multitheftauto.com/ download random atm script analyse it and do it?
-
function close_p(button, state) if (source == atmGUI_Button1[3]) then guiSetVisible(atmGUI_Window[1],false) showCursor(false) end end addEventHandler ( "onClientGUIClick", atmGUI_Button1[3],false)
-
-
you did not trigger function createatmGUI() when entering on marker.
So there is no gui created and no GUI element called atm_Window[1]
-
-
function SpawnOnBeach() spawnPlayer (source,2938.6123046875, -2051.7548828125, 3.5480432510376, 90, math.random (7,288), 0, 0) end addEventHandler("OnPlayerJoin", getRootElement(), SpawnOnBeach) addEventHandler("OnPlayerWasted", getRootElement(), SpawnOnBeach)
-
-
You mean screen is black or what??
fadeCamera(source, true) setCameraTarget(source, source)
-
triggerClientEvent (hitPlayer,"openWindow",hitPlayer,hitPlayer)
-
Two brothers playing MTA on the same computer will have the same serial (even if they are not using the same user session)
Yeah, so I guess I should use setElementData ? Maybe like, setElementData(theVehicle "owner") ? Or setAccountData or sth? I am going to use MySQL for this problems but I am new for MySQL
Well you can use setVehiclePlateText and getVehiclePlateText, then just add setElementData to owner of the car text-plate + serial, so you will avoid, doing it by nickname and what Citizen said.
-
You want all cars from the game to be in gridList??
local car_c = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) local cars = getElementsByType("vehicle") local column = guiGridListAddColumn( car_c, "Cars_id", 0.85 ) for numb, car in iparis(cars) do local id = getElementModel(car) local row = guiGridListAddRow ( car_c ) guiGridListSetItemText ( car_c, row, column, id, false, true ) end
Then you just use form from wiki example of gridList to get data from car_id table.
You create server event and trigger it when ID is choosen from gridlist + button clicked
-
getPlayerSerial()
-
mysql,sql,xml
recommend mysql or sql, faster
If you want to use mysql and sql you need to use serial of player to recognize the owner of car.
-
it doesnt work, i tried to fix the problem, but i couldn't.
when i press the Molotov button it should give me a Molotov.
but it doent work.
what should i do?
Check that you give it to yourself in code. If this is good mlotov id, and if you are doing it server-side(giveWeapon) not client-side.
-
You need to save element of car in player element data. While creating car for player, or while first enter, or while player targeting the car. There is many possibilities.
Those in lua are just examples of couple function that you can use to get car element.
setElementData() onPlayerTarget() onVehicleEnter() onClientVehicleEnter()
Or you can just setDataElement for car with owner serial, then loop through all cars searching for the right one with owner serial. Yep but this is less efficient way.
For exiting you need to check if car is locked on onClientVehicleStartExit event if yes then cancelEvent() with information.
onClientVehicleStartExit() cancelEvent
-
I've had other priorities and unfortunately I do not have time to learn lua half year
Then you need to pay money for the scripter. I wonder if you help people all the time for free. This section of forum is about helping with code errors etc not a "get a script for free".
-
CLIENT SIDE~~
GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) addEvent("spawnpanel",true) addEventHandler("spawnpanel", root, function() guiSetVisible(GUIEditor.window[1],true) showCursor(true) end )
SERVER SIDE~~
addEventHandler("onPlayerLogin", root, function () triggerClientEvent(source,"spawnpanel", source) end )
Please help me with this script guys.... It does show the panel but cant click on any of the tab....also the buttons..
And also shows the panel even when Im not log in yet...
It shows panel from the start beacuse you did not use after creating gui
guiSetVisible(GUIEditor.window[1],false)
and for buttons
function onClickBtn ( button, state ) if (source == button_name) then -- when button click function end end addEventHandler ( "onClientGUIClick", button_name, onClickBtn, false )
-
setBlipVisibleDistance()
-
Server-Side
https://wiki.multitheftauto.com/wiki/OnResourceStart
There was topic about it already if you create object client-side and the object will be destroyable, localPlayer will destroy it and walktrought him, then others client will still have the object and see how the one player who destroyed it is walking inside of that object.
-
Hey guys, uhmm... well I want to use the warpPedIntoVehicle function in the client side.... but I need to update my server to 1.4 to use it. How do I do so? My MTA SA is updated to 1.4 but the mta server.exe isn't. Please help me ASAP
Add this to your meta.xml and restart server
client="1.3.0-9.04491" />
-
Maybe it's resets when they EXIT?
addEventHandler("onClientVehicleExit", getRootElement(),StopFunc)
addEventHandler("onClientVehicleExit", getLocalPlayer(),StopFunc)
-
hmm why no creating normal database and retriev or save data that you need in exact moment?
-
No problem mate, sometimes those things like to be a pain in the a** Good luck wkth your mysql adventure. It gets better later!
[Help] Gate not moving
in Scripting
Posted
Np mate ^^ happens