-
Posts
1,273 -
Joined
-
Last visited
-
Days Won
1
Everything posted by GTX
-
You must have voice enabled in MTA configuration file.
-
Once you export it, you can find it in output folder.
-
You can createBrowser and then apply it to shader.
-
You're not even creating the object. Where's createObject function? And where's server side?
-
Maybe if you'd do it by yourself, you wouldn't have this problem. Looks like it's decompiled. x, y, z = getElementPosition(l_5_0), l_5_0 to x, y, z = getElementPosition(l_5_0)
-
There's a resource which does that. It's called visualiser. If you want to play a YouTube video or something, use createBrowser
-
I would like to help but I can't understand you. You want to play an URL which you paste in editbox?
-
Maybe post full script? It's because you didn't define x or y.
-
Pff, drugs much? Console can't be banned lol... Or am I wrong?
-
triggerClientEvent can be used server side. You're using it in client. Either use triggerEvent or triggerServerEvent in case if you want it to send to server side.
-
What does that mean? screenCinema = createBrowser(1000,1000) addEventHandler("onClientBrowserCreated", screenCinema, function() requestBrowserDomains({ "mtasa.com", "youtube.com"}) --loadBrowserURL(webBrowser, "html/site.html") loadBrowserURL(screenCinema, "youtube.com") addEventHandler("onClientRender", root, webBrowserRender) end ) function webBrowserRender() dxDrawMaterialLine3D (110,1140,30,110,1140,14, screenCinema, 18.5, tocolor(255,255,255,255)) end
-
It means that skin variable isn't number. Shouldn't do any harm to your script. spawnPlayer (player, x,y,z+0.5, math.random(0,360), skin or 0, 0, 0)
-
setElementCollisionsEnabled
-
How can I help you if I can't understand you? Also note that this is not a request forum. Write your own script, we can help you solve the issues. Read this: viewtopic.php?f=91&t=47897
-
I don't understand a word you say, I cannot help you.
-
Whaaaat???? When player leaves the team, the grid list does not get refreshed?
-
Don't understand working function (player, command, ...)
GTX replied to Nikolay_888's topic in Scripting
Try this. function testSumm (thePlayer, command, ...) local s = 0 local t = {...} for i, n in ipairs(t) do s = s + n end outputChatBox (s, thePlayer) end addCommandHandler("summ", testSumm) -
You can't select an editbox manually by script.
-
It's not possible to check if Caps Lock is enabled. If you really want to do it, you have to add an event onClientKey, check if caps was pressed and then set a variable or something, but then you could mix between enabled on client and disabled in MTA. However it is not possible to check if it is enabled or disabled.
-
local sound setTimer(function() if isPedDead(localPlayer) then return end local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle and getElementModel(vehicle) ~= 476 then local vx,vy,vz = getElementVelocity(vehicle) if vx+vy+vz == 0 then if sound then setSoundPaused(sound,true) end else if not sound then sound = playSound("sounds/sound.mp3") setSoundVolume(sound, 0.1) else setSoundPaused(sound,false) end end elseif sound then setSoundPaused(sound,true) end end,1000,0) function stopSound() setSoundPaused(sound, true) end addEventHandler("onClientPlayerWasted", root, stopSound)
-
sx,sy = guiGetScreenSize() x,y = (sx/1280),(sy/768) function edit () color2 = tocolor(255,255,255,255) dxDrawText("Close", x*756, y*522, x*870, y*552, color2, 1.30, "pricedown", "left", "top", false, false, false, false, false) addEventHandler( "onClientRender", root, edit ) function join ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if ( absoluteX >= x*756 and absoluteY >= y*552 ) and (absoluteX <= x*756+x*870 and absoluteY <= y*522+y*522) then if ( button == "left" and state == "up" ) then showCursor(false) removeEventHandler("onClientRender", root, edit) end end end addEventHandler ( "onClientClick", root, join )
-
local Vehicle = {} function onVehicleExplode() destroyElement(Vehicle[getVehicleOccupant(source)]) end addEventHandler("onVehicleExplode", getRootElement(), onVehicleExplode) local Cash = 500000 function rentVehicle () if ( getPlayerMoney ( source ) < Cash ) then outputChatBox("You need 300,000$ to rent this vehicle.", source, 255,0,0) else takePlayerMoney(source, Cash) if (getElementZoneName(source) == "Los Santos International") then Vehicle[source]= createVehicle(425, 1924.5841064453, -2291.1552734375, 13.5) warpPedIntoVehicle(source, Vehicle[source]) else Vehicle[source]= createVehicle (425,1485.49, 1231.93, 10.82,0,0,180) end warpPedIntoVehicle(source, Vehicle[source]) end end addEvent ("rentV", true) addEventHandler ("rentV", root, rentVehicle)
