-
Posts
696 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Dzsozi (h03)
-
Sorry, edited.
-
Hello everyone! Today I tried to make a notification thing, but my problem is that it doesn't fit all the resolutions. A picture of my resolution (1680x1050, fits perfectly) A picture of my friend's resolution (1360x768, in lower screen sizes it's not the same) How can I fix this and make this fit perfectly on all resolutions? Please help. This is how I made the guiGetScreenSize() thing: local sx,sy = guiGetScreenSize () local notificationX = sx-notificationWidth-sx*(840/1024)
-
This not even helps me, I know these functions, but I don't know how to write it, how to define other players to get their skin.
-
Hello everyone! I'm trying to make a scoreboard, and I want to get all the player's skin, but I don't know how. How to get other player's skin? I know how to draw it with picture, but I don't know how to get it, and that's my problem. Can anybody help me please?
-
Thank you guys, you are awesome!
-
Now I have another problem. It's the same, I don't know how to trigger server side event to client side. Can you help me please? I don't know what am I made wrong. Here's a part of the codes: -- server function halAdas (thePlayer) exports.global:giveItem(thePlayer, 149, 1) end addEvent("halKifogas", true) addEventHandler("halKifogas", getRootElement(), halAdas) -- client triggerServerEvent("halKifogas", getLocalPlayer()) What's wrong with my script? I doesn't gives me the item with ID 146.
-
And after that how can I delete them?
-
I deleted the whole gas station, but it's still there. But they should have an ID as well right? So maybe it can be deleted through lua?
-
Hello everyone! I have a question. Is this possible to remove the car wash brushes at the Idlewood gas station? Because I want to map a custom gas station and I want the brushes to be there. How is this possible to remove this non-collidable things? I mean windows on the buildings when it's night, the car wash brushes, etc.
-
Thank you very much!
-
It seems like it's not working. No changes when I die, it's like before. Do you have any other ideas?
-
Hello! So today I made a script which is about robbing a shop. Everything works fine, except a click function. When I click on 'Rob' nothing happens, but I triggered a server side event which is gives you random money between 30 and 70k. But nothing. Can someone help me please? Here's this part of the code ("kassza" means cash register): -- client kassza = createObject ( 1514, 1924.4658203125, -1787.0101318359, 13.8, 180, 180, 0 ) setElementData(kassza, "message", "Kassza") wRightClick = nil bKirabol = nil bCloseKassza = nil ax, ay = nil localPlayer = getLocalPlayer() kassza = nil function kirablas() if (source==bKirabol) then triggerServerEvent("onKasszaKirablasa", getLocalPlayer()) end end function clickKassza(button, state, absX, absY, wx, wy, wz, element) if getElementData(getLocalPlayer(), "exclusiveGUI") then return end if element and getElementType( element ) == "object" and button == "right" and state == "down" and getElementModel(element) == 1514 then local x, y, z = getElementPosition(localPlayer) if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz) <= 3 then if (wRightClick) then hideKassza() end showCursor(true) ax = absX ay = absY kassza = element showKassza() end end end addEventHandler("onClientClick", getRootElement(), clickKassza, true) function showKassza() wRightClick = guiCreateWindow(ax, ay, 150, 100, "Kassza", false) bKirabol = guiCreateButton(0.05, 0.23, 0.87, 0.2, "Kassza kirablása", true, wRightClick) addEventHandler("onClientGUIClick", bKirabol, kirablas, false) bCloseKassza = guiCreateButton(0.05, 0.63, 0.87, 0.2, "Menü bezárása", true, wRightClick) addEventHandler("onClientGUIClick", bCloseKassza, hideKassza, false) end function hideKassza() if (isElement(bCloseKassza)) then destroyElement(bCloseKassza) end bCloseKassza = nil if (isElement(wRightClick)) then destroyElement(wRightClick) end wRightClick = nil ax = nil ay = nil showCursor(false) triggerEvent("cursorHide", localPlayer) setElementData(localPlayer, "exclusiveGUI", false, false) end -- server addEvent("onKasszaKirablasa", true) addEventHandler("onKasszaKirablasa", getRootElement(), function (jatekos, thePlayer, boltos) exports.global:giveMoney(thePlayer, math.random(30000,70000)) end ) Why is it not working? As I have already mentioned, it should give money between 30000 and 70000 when you click on the button "Kassza kirablása" (it means "Rob").
-
I have another question. Is this possible to stop the flying camera when a player gets wasted? Because I want to make a timer for respawn, and I want the camera to stay at the player. How is this even possible? I've already seen it in a video.
-
I think they are just custom .dff and .txd files.
-
Ohh, thank you very much guys!!
-
This is the same code that I posted.
-
Hi everyone! Today I tried to make a script, which is set the player and the vehicle to another interior and dimension when the event 'onClientMarkerHit' is activated. Everything works, except the camera. For some reason it shows everything black in the background, except the vehicle and the player. How can I fix this? setElementInterior ( vehicle, 24 ) setElementInterior ( localPlayer, 24 ) setElementDimension ( vehicle, 65000 + playerid ) setElementDimension ( localPlayer, 65000 + playerid ) setElementPosition ( vehicle, 612.9990234375, -2.9853515625, 1000.7930908203 ) setElementRotation ( vehicle, -0.48928847908974, 1.5928211723804e-005, 72.723457336426 ) setCameraInterior ( 24 ) setCameraMatrix ( 604.42749023438, -5.3609199523926, 1002.9470214844, 694.00811767578, 29.228715896606, 975.03881835938 ) This is only the part where I put the interior and dimension things, everything is defined, works fine, except the camera, as I mentioned.
-
Okay, thank you, I will try something.
-
Hello guys, today I was thinking about if is this possible if someone dies the dead body stays at the position where he died and the player is respawns. Hope you understand me. If is this possible what events and functions should I use to make this?
-
(sorry for putting this in code, but [lua] is bugged for some reason) Try this: -- client side (not tested) function isPedAiming ( thePedToCheck ) if isElement(thePedToCheck) then if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then return true end end end return false end function checkAim() if not isPedAiming(localPlayer) then toggleControl( "fire", false) else toggleControl( "fire", true) end end addEventHandler ( "onClientResourceStart", getRootElement(), checkAim )
-
It's not working
-
Hello! I have a question. How can I set element data for objects which are in a table? So I use this script: https://community.multitheftauto.com/in ... ls&id=4931 and I want to set a message to all the objects which are in the table, but it's not working. What is wrong with my code? local models = {[2175]=true, [2190]=true,[2009]=true,[2008]=true,[11631]=true,[2198]=true,[2172]=true,[2193]=true,[2165]=true,[1998]=true,[1999]=true} function pcText(model) setElementData(models[model], "message", "Computer") end
-
Where is the lv, ls and sf_bg defined?
-
I have already tried it, but it's not working.
-
Okay, I will try it, thank you for your answer!