-
Posts
460 -
Joined
-
Last visited
Everything posted by Mefisto_PL
-
I know how to make circle radar, but I want to make Rectangle radar..
-
I don't want to download from community, I would like to make MY OWN radar.. But what I must use : C
-
I would like to make own radar, I wanted to use that: https://forum.multitheftauto.com/viewtopic.php?f=91&t=46866&hilit=create+radar but it's bugged.. Any suggestions?
-
Ohh.. I fix that, but thanks everyone
-
function StartRadio() if source == StationsGridList then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, col ) if isElement( radio ) then radio = false else radio = playSound( sTations[statioN] ) end end end end addEventHandler("onClientGUIClick", StationsGridList, StartRadio ) Why it's not working? :C
-
function StartRadio() if source == StationsGridList then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) if isElement( radio ) then destroyElement( radio ) end radio = playSound( sTations[statioN] ) end end end addEventHandler("onClientGUIClick", StationsGridList, StartRadio ) Doesn't make a sound
-
function StartRadio() if source == StationsGridList then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) if isElement( radio ) then stopSound( radio ) end radio = playSound( sTations[statioN] ) end end end addEventHandler("onClientGUIClick", StationsGridList, StartRadio ) Working, but I can't stop this sound, when I click on it second time then play it again..
-
Okey I made it with buttons but when I double-clicked on Play then sound starts again ( double sound ) function StartRadio() if source == RadioPlayButton then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) local radioItem = guiGridListGetSelectedItem ( StationsGridList ) radio = playSound( sTations[statioN] ) end end end addEventHandler("onClientGUIClick", RadioPlayButton, StartRadio ) function StopRadio() if source == RadioStopButton then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) local radioItem = guiGridListGetSelectedItem ( StationsGridList ) stopSound( radio ) end end end addEventHandler("onClientGUIClick", RadioStopButton, StopRadio )
-
Bad Argument Data [ 3 argument ] " removeEventHandler("onClientGUIDoubleClick", StationsGridList, StopRadio ) "
-
Thanks, but a mistake is in 2. argument "radioItem".. What could be wrong?
-
It's not working but I have made that and I have a mistake in addEventHandler ( 2 argument ) local sTations ={ ["Power 181"] = "http://www.181.fm/asx.php?station=181-uktop40&style=&a..scription="; } function CreateRadioGui ( ) if ( guiGetVisible ( RadioGui ) == true ) then guiSetVisible ( RadioGui, false ) showCursor ( false ) guiSetInputEnabled ( false ) else guiSetVisible ( RadioGui, true ) showCursor ( true ) guiSetInputEnabled ( true ) end end RadioGui = guiCreateWindow ( 0.75, 0.65, 0.25, 0.35, "ASDF - Radio Gui", true ) guiSetAlpha ( RadioGui, 0.9 ) guiSetVisible ( RadioGui, false ) RadioCloseButton = guiCreateButton ( 0.0, 0.85, 1.0, 0.25, "Close", true, RadioGui ) StationsGridList = guiCreateGridList ( 0.0, 0.1, 1.0, 0.70, true, RadioGui ) StationsList = guiGridListAddColumn( StationsGridList, "Stations List", 0.9 ) addCommandHandler ( "radio", CreateRadioGui ) function CloseRadioGui ( ) if ( source == RadioCloseButton ) then guiSetVisible ( RadioGui, false ) showCursor ( false ) guiSetInputEnabled ( false ) end end addEventHandler ( "onClientGUIClick", RadioCloseButton, CloseRadioGui ) addEventHandler( "onClientResourceStart", getRootElement( ), function () for StationName, StationAdress in pairs ( sTations ) do local row = guiGridListAddRow ( StationsGridList ) guiGridListSetItemText ( StationsGridList, row, 1, StationName, false, false ) end end ) function StartRadio() if source == StationsGridList then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) local radioItem = guiGridListGetSelectedItem ( StationsGridList ) radio = playSound( sTations[statioN] ) end end end addEventHandler("onClientGUIClick", radioItem, Start ) function StopRadio() if source == StationsGridList then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) local radioItem = guiGridListGetSelectedItem ( StationsGridList ) stopSound( radio ) end end end addEventHandler("onClientGUIDoubleClick", radioItem, StopRadio )
-
But fix is binded without player element and it's working
-
Doesn't working.. function flip (playerSource) local theVehicle = getPedOccupiedVehicle (playerSource) if (theVehicle and getVehicleController ( theVehicle ) == playerSource) then local rx, ry, rz = getVehicleRotation ( theVehicle ) if ( rx > 110 ) and ( rx < 250 ) then local x, y, z = getElementPosition ( theVehicle ) setVehicleRotation ( theVehicle, rx + 180, ry, rz ) setElementPosition ( theVehicle, x, y, z + 2 ) end end end bindKey("x", "down", flip) addCommandHandler("flip" , flip) addCommandHandler("f", flip)
-
I have a small problem.. I found a radio gui, but when I double click on the song, it doesn't stop, but when I click it again then sound is double played.. local sTations ={ ["Power 181"] = "http://www.181.fm/asx.php?station=181-uktop40&style=&a..scription="; } function CreateRadioGui ( ) if ( guiGetVisible ( RadioGui ) == true ) then guiSetVisible ( RadioGui, false ) showCursor ( false ) guiSetInputEnabled ( false ) else guiSetVisible ( RadioGui, true ) showCursor ( true ) guiSetInputEnabled ( true ) end end RadioGui = guiCreateWindow ( 0.75, 0.65, 0.25, 0.35, "ASDF - Radio Gui", true ) guiSetAlpha ( RadioGui, 0.9 ) guiSetVisible ( RadioGui, false ) RadioCloseButton = guiCreateButton ( 0.0, 0.85, 1.0, 0.25, "Close", true, RadioGui ) StationsGridList = guiCreateGridList ( 0.0, 0.1, 1.0, 0.70, true, RadioGui ) StationsList = guiGridListAddColumn( StationsGridList, "Stations List", 0.9 ) addCommandHandler ( "radio", CreateRadioGui ) function CloseRadioGui ( ) if ( source == RadioCloseButton ) then guiSetVisible ( RadioGui, false ) showCursor ( false ) guiSetInputEnabled ( false ) end end addEventHandler ( "onClientGUIClick", RadioCloseButton, CloseRadioGui ) addEventHandler( "onClientResourceStart", getRootElement( ), function () for StationName, StationAdress in pairs ( sTations ) do local row = guiGridListAddRow ( StationsGridList ) guiGridListSetItemText ( StationsGridList, row, 1, StationName, false, false ) end end ) function StartRadio() if source == StationsGridList then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) playSound( sTations[statioN] ) end end end addEventHandler("onClientGUIClick", getRootElement( ), StartRadio ) function StopRadio() if source == StationsGridList then local row, col = guiGridListGetSelectedItem ( StationsGridList ) if ( row and col and row ~= -1 and col ~= -1 ) then local statioN = guiGridListGetItemText ( StationsGridList, row, 1 ) stopSound( sTations[statioN] ) end end end addEventHandler("onClientDoubleClick", getRootElement( ), StopRadio )
-
Map Editor - Problem
Mefisto_PL replied to Mefisto_PL's topic in Pomoc ze skryptami i programowaniem w Lua
Oh faktycznie w editor_dump był pusty plik mojej mapy, dziękuję Ci serdecznie , jesteś moim mistrzem -
Przesiedziałem kilka godzin nad moją mapą, używałem tego toolbox'a i potem dodawałem już normalnie obiekty , zapisałem mapę ,i chciałem ją przetestować, kliknąłem na ikonkę testu ,i nagle wszystkie ikonki mi zniknęły no więc zrestartowałem map editor , otworzyłem mapę, lecz nie napisało na dole, że ją otworzono i nie było na niej żadnych obiektów, kliknąłem, aby stworzyć nową mapę, napisało, że nie można tego zrobić, bo mapa jest zapisywana/otwierana, wgrałem jeszcze raz najnowszą wersję skryptu (zawartość folderu [editor]), ale to nic nie pomogło. Na każdej mapie się tak dzieje, po prostu nie mogę nic z tym zrobić. Błagam pomocy, zależy mi na tej mapie :
-
Duży ping podczas pobierania mapy.
Mefisto_PL replied to zoltar's topic in Pomoc z grą lub klientem/serwerem MTA
Możesz też spróbować zmienić coś w Settings -> Advanced . Mi np pomogło jak ustawiłem Debug Setting #6734 Graphics, szybciej zaczęło mi si ściągać i ping mam mniejszy (Niestety wadą jest fakt, że ta opcja się nie zapisuje po wyłączeniu MTA). Widzę, że grasz na serwerach race, więc możesz też użyć komendy /fps_limit=LICZBA. Proponuję ustawić /fps_limit=40 i nie powinieneś mieć zmniejszenia fps co równa się z mniejszymi lagami o ile nie usunięciem ich . -
Still I don't get neons on player hit pickup ..
-
Thank you ! That's working , but I want to create neon on player hit pickup. ( my events doesn't working ; < ) How I can add neons to one account too? function neons ( thePlayer ) local x, y, z = getElementPosition ( source ) local id = getElementModel ( source ) if ( getPlayerName ( thePlayer ):find ( "AS|" ) ) then if ( vehicles [ id ] ) then local neon = createObject ( 14403, x, y, z ) local neon1 = createObject ( 14403, x, y, z ) if ( id == 415 ) then attachElements ( neon1, source, 1, 0, -0.5 ) attachElements ( neon, source, -1, 0, -0.5 ) elseif ( id == 411 ) then attachElements ( neon1, source, 1.05, 0, -0.55 ) attachElements ( neon, source, -1.05, 0, -0.55 ) elseif ( id == 549 ) then attachElements ( neon1, source, 1, 0, -0.4 ) attachElements ( neon, source, -1, 0, -0.4 ) end end end end addEventHandler ( "onVehicleEnter", getRootElement(), neons ) addEventHandler ( "onPlayerPickUpRacePickup", getRootElement(), neons ) addEventHandler ( "onPlayerReachCheckpoint", getRootElement(), neons )
-
Now it doesn't working.. ( I replace this models ) [05:55:46] WARNING: neons\server.lua:9: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] [05:55:46] WARNING: neons\server.lua:13: Bad argument @ 'createObject' [Expected number at argument 2, got boolean] [05:55:46] WARNING: neons\server.lua:14: Bad argument @ 'createObject' [Expected number at argument 2, got boolean] [05:55:46] WARNING: neons\server.lua:19: Bad argument @ 'attachElements' [Expected element at argument 1, got boolean] [05:55:46] WARNING: neons\server.lua:20: Bad argument @ 'attachElements' [Expected element at argument 1, got boolean]
-
Okey I change it , but it don't changes anything..
-
I made script which add neons to vehicle, but only for peoples who have "AS|" in their nick. It's add neons, but for all cars.. ( I want to add only for Cheetah, Infernus and Tampa ) If player isn't in team this neon is in car and don't follow player, but it couldn't create this neon : | This is code.. function neons ( source, theElement ) local theVehicle = getPedOccupiedVehicle ( source ) local x, y, z = getElementPosition ( theVehicle ) local id = getElementModel ( theVehicle ) local neon = createObject ( 14399, x, y, z ) local neon1 = createObject ( 14399, x, y, z ) if (string.find(getPlayerName(source),"AS|")) then if id == 415 then attachElements ( neon1, theVehicle, 1, 0, -0.5 ) attachElements ( neon, theVehicle, -1, 0, -0.5 ) elseif id == 411 then attachElements ( neon1, theVehicle, 1.05, 0, -0.55 ) attachElements ( neon, theVehicle, -1.05, 0, -0.55 ) elseif id == 549 then attachElements ( neon1, theVehicle, 1, 0, -0.4 ) attachElements ( neon, theVehicle, -1, 0, -0.4 ) if not (string.find(getPlayerName(source),"AS|")) then detachElements ( neon1 ) detachElements ( neon ) end end end end addEventHandler("onVehicleEnter", getRootElement(), neons)
