-
Posts
877 -
Joined
-
Last visited
Everything posted by denny199
-
hm, i think it's in the map i will try tommrow
-
Hey, i was looking on my pc and i found a map, i tought hmm, thit was my epic map but now i got a problem, when i start the map it doesn't show me here's my meta: <meta> <map src="geilemap.map" dimension="0"></map> <settings> <setting name="#minplayers" value="[ 0 ]"></setting> <setting name="#maxplayers" value="[ 128 ]"></setting> <setting name="#gravity" value="[ 0.008000 ]"></setting> <setting name="#weather" value="[ 0 ]"></setting> <setting name="#time" value="0:0"></setting> <setting name="#locked_time" value="[ false ]"></setting> <setting name="#waveheight" value="[ 0 ]"></setting> <setting name="#gamespeed" value="[ 1 ]"></setting> </settings> </meta> and here's my .map file, i shorted it ps. i don't know if i'm in the right section
-
Cop&Paste the one off solidsnake, btw, the code that DNL291 typed is wrong. this is needed: addEventHandler("onClientPedDamage", root, cancelEvent() ) () was missing.
-
how to resolve this problemen then?, caus I don't know a another way.
-
This is client with server side, it never will work.
-
Well, I don't know exactly, I had the attach part from this: /viewtopic.php?f=91&t=31470&p=335826&hilit=sirene#p335826 But can we attach a data under elements?? and then destroy de element via the element data?
-
both don't work, it's even not removing the sound, but anyway thanks for the scripting, but it's still not working ;-( error @ destroyElement -- this one destroyElement (sirene)
-
Ok, i know how to fix this bug. just make a script thatdo this: setFarClipDistance(300) and if it's not working use this to: setFogDistance ( 20 ) so : setFarClipDistance(300) setFogDistance ( 20 )
-
Ok, sorry for this LOOOO-O-O-ONG waiting but u know school goes first. Ok, kennix, it didn't work but i will say it better; I'm attaching a music/sound to my car with this script. U're attaching later a music/sound to ur car, while my sound is still playing After i think, hmmm this sound is bored, I press the stop button. [ I press the stop button ] My sound doesn't go away, But your'e music/sound is going away, that's it.
-
Ok, i was a while inactive was busy with school, but now here's my code, whole [ removed attach caus that works fine] GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(436,285,486,412,"Box In A Car -- BIAC",false) GUIEditor_Grid[1] = guiCreateGridList(21,144,183,259,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiWindowSetSizable (GUIEditor_Window[1], false) GUIEditor_column = guiGridListAddColumn(GUIEditor_Grid[1],"Muziek",0.9) GUIEditor_Button[3] = guiCreateButton(251,154,175,49,"Play",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(251,254,175,49,"Stop",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(258,331,82,80,"Version 1.0",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255, 0 ,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") guiSetVisible (GUIEditor_Window[1], false ) function guiToggle (player ) player = getLocalPlayer() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible (GUIEditor_Window[1], false ) showCursor ( false ) else guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end bindKey ( "f2", "down", guiToggle ) local sounds = {} function testsound1 ( vehicle, path, stationPath ) sirene = playSound3D (path, 0,0,0) attachElements ( sirene, vehicle) setSoundVolume(sirene, 0.7) sounds [ vehicle ] = sirene end addEvent( "testsound", true ) addEventHandler("testsound", getRootElement(), testsound1) function stopsound (player, source) pl = getLocalPlayer() --local sirene = sounds [ vehicle ] stopSound ( sirene ) outputChatBox ( "gelukt") --destroyElement ( sirene ) end addEvent( "testsoundremove", true ) addEventHandler("testsoundremove", getRootElement(), stopsound) stationsNames = {} stations = {} function onGuiClick3 (button, state, x,y) if source == GUIEditor_Button[3] and state == "up" then local selected = guiGridListGetSelectedItem (GUIEditor_Grid[1]) if selected then local stationName = guiGridListGetItemText (GUIEditor_Grid[1], selected, GUIEditor_column) if stationName then triggerServerEvent ("attachomg", getLocalPlayer(), getLocalPlayer(), stationName) end end end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], onGuiClick3, true ) function onGuiClick4 (button, state, x,y) if source == GUIEditor_Button[4] and state == "up" then triggerServerEvent ( "testsoundwegserver", getLocalPlayer(), getLocalPlayer(), com, stationPath,newX, newY, newZ, getLocalPlayer()) end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], onGuiClick4, true ) function onStart () triggerServerEvent ("requestForRadios", getLocalPlayer(), getLocalPlayer()) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), onStart) function onJoin (radia, names, st) stationsNames = names stations = st for k,v in ipairs(stationsNames) do local row = guiGridListAddRow ( GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, GUIEditor_column, v, false, false ) end end addEvent ("sendAllRadios", true) addEventHandler ("sendAllRadios", getRootElement(), onJoin) server function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(angle+90) local plusX = math.cos(a) * dist local plusY = math.sin(a) * dist return x+plusX, y+plusY end xmlFile = xmlLoadFile ("radios.xml") radios = {} stations = {} stationsNames = {} function loadStations () if xmlFile then local children = xmlNodeGetChildren (xmlFile) for k,v in ipairs(children) do local radioTable = xmlNodeGetAttributes (v) for name,value in pairs(radioTable) do --outputChatBox (tostring(value)) if name == "name" then stationName = value elseif name == "path" then stationPath = value end end stations[stationName] = stationPath table.insert (stationsNames, 1, stationName) end table.sort (stationsNames) end end loadStations () function attachradio2 (player,station) --if station then local stationPath = stations[station] --if stationPath then local x,y,z = getElementPosition( player ) local rx,ry,rz = getElementRotation ( player ) local newX, newY = getPointFromDistanceRotation (x,y, 1.5, rz) local newZ = z - 1 outputChatBox ( "triggering sucses") local com = getPedOccupiedVehicle(player) triggerClientEvent ( "testsound", player, com, stationPath,newX, newY, newZ) --triggerClientEvent ("onNewRadioCreate", getRootElement(), newX, newY, newZ, stationPath) --outputChatBox ("New station: " .. station .. " created, path: " .. tostring(stationPath), 0,220,0) table.insert (radios, 1, {newX, newY, newZ, stationPath}) end addEvent ("attachomg", true) addEventHandler ("attachomg", getRootElement(), attachradio2) function onJoin (player) if radios then triggerClientEvent (player, "sendAllRadios", getRootElement(), radios, stationsNames, stations) end end addEvent ("requestForRadios", true) addEventHandler ("requestForRadios", getRootElement(), onJoin) function testsoundwegserver2 (player,station) local com = getPedOccupiedVehicle ( player ) outputChatBox ( "triggering sucsesNAARSERVERSIDE") triggerClientEvent ("testsoundremove", source, com, sirene) end addEvent ("testsoundwegserver", true) addEventHandler ("testsoundwegserver", getRootElement(),testsoundwegserver2)
-
didn't work, tryed source to.
-
ok, i tryed this: didn't work: -- removed the other stuff cl: local sounds = {} function testsound1 ( vehicle, path, stationPath ) sirene = playSound3D (path, 0,0,0) attachElements ( sirene, vehicle) setSoundVolume(sirene, 0.7) sounds [ vehicle ] = sirene end addEvent( "testsound", true ) addEventHandler("testsound", getRootElement(), testsound1) function stopsound (player, source) pl = getLocalPlayer() --local sirene = sounds [ vehicle ] stopSound ( sirene ) outputChatBox ( "gelukt") --destroyElement ( sirene ) end addEvent( "testsoundremove", true ) addEventHandler("testsoundremove", getRootElement(), stopsound) function onGuiClick4 (button, state, x,y) if source == GUIEditor_Button[4] and state == "up" then triggerServerEvent ( "testsoundwegserver", getLocalPlayer(), getLocalPlayer(), com, stationPath,newX, newY, newZ, getLocalPlayer()) end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], onGuiClick4, true ) server: function testsoundwegserver2 (player,station) local com = getPedOccupiedVehicle ( player ) outputChatBox ( "triggering sucsesNAARSERVERSIDE") triggerClientEvent (player,"testsoundremove", getRootElement(), com, sirene) --it's trggering good, but only for the last player who attached. -- source didn't work to. end addEvent ("testsoundwegserver", true) addEventHandler ("testsoundwegserver", getRootElement(),testsoundwegserver2) edit: or must i store the sound with setelementData
-
Hello, I got a problem with my new script, i was attaching the sound to my car, ofc for evryone but then someone else attached the sound to, but then i pressed the stop button then the sound was stopped by him but not by me. but i want to stop the sound only for the player who clicked on that button. but didn't work Here's my code: CLIENT SIDE local sounds = {} function testsound1 ( vehicle, path, stationPath ) sirene = playSound3D (path, 0,0,0) attachElements ( sirene, vehicle) setSoundVolume(sirene, 0.7) sounds [ vehicle ] = sirene end addEvent( "testsound", true ) addEventHandler("testsound", getRootElement(), testsound1) function stopsound () pl = getLocalPlayer() --local sirene = sounds [ vehicle ] stopSound ( sirene ) --outputChatBox ( "klaar met triggeren") --destroyElement ( sirene ) end addEvent( "testsoundremove", true ) addEventHandler("testsoundremove", getRootElement(), stopsound) stationsNames = {} stations = {} function onGuiClick3 (button, state, x,y) if source == GUIEditor_Button[3] and state == "up" then local selected = guiGridListGetSelectedItem (GUIEditor_Grid[1]) if selected then local stationName = guiGridListGetItemText (GUIEditor_Grid[1], selected, GUIEditor_column) if stationName then triggerServerEvent ("attachomg", getLocalPlayer(), getLocalPlayer(), stationName) end end end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[3], onGuiClick3, true ) function onGuiClick4 (button, state, x,y) if source == GUIEditor_Button[4] and state == "up" then triggerServerEvent ( "testsoundwegserver", getRootElement(), com, stationPath,newX, newY, newZ) end end addEventHandler ( "onClientGUIClick", GUIEditor_Button[4], onGuiClick4, true ) SERVER SIDE function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(angle+90) local plusX = math.cos(a) * dist local plusY = math.sin(a) * dist return x+plusX, y+plusY end xmlFile = xmlLoadFile ("radios.xml") radios = {} stations = {} stationsNames = {} function loadStations () if xmlFile then local children = xmlNodeGetChildren (xmlFile) for k,v in ipairs(children) do local radioTable = xmlNodeGetAttributes (v) for name,value in pairs(radioTable) do --outputChatBox (tostring(value)) if name == "name" then stationName = value elseif name == "path" then stationPath = value end end stations[stationName] = stationPath table.insert (stationsNames, 1, stationName) end table.sort (stationsNames) end end loadStations () function attachradio2 (player,station) --if station then local stationPath = stations[station] --if stationPath then local x,y,z = getElementPosition( player ) local rx,ry,rz = getElementRotation ( player ) local newX, newY = getPointFromDistanceRotation (x,y, 1.5, rz) local newZ = z - 1 outputChatBox ( "triggering sucses") local com = getPedOccupiedVehicle(player) triggerClientEvent ( "testsound", getRootElement(), com, stationPath,newX, newY, newZ) --triggerClientEvent ("onNewRadioCreate", getRootElement(), newX, newY, newZ, stationPath) outputChatBox ("New station: " .. station .. " created, path: " .. tostring(stationPath), 0,220,0) table.insert (radios, 1, {newX, newY, newZ, stationPath}) end addEvent ("attachomg", true) addEventHandler ("attachomg", getRootElement(), attachradio2) function testsoundwegserver2 (player,station) outputChatBox ( "triggering sucsesNAARSERVERSIDE") triggerClientEvent ( "testsoundremove", getRootElement(), com) end addEvent ("testsoundwegserver", true) addEventHandler ("testsoundwegserver", getRootElement(),testsoundwegserver2) i tryed this to: [ LOCAL as local] LOCAL sirene = playSound3D (path, 0,0,0) but then the sound wasn't dissapeared
-
dm maps without permissions off owner: https://community.multitheftauto.com/index.php?p= ... ls&id=4064 https://community.multitheftauto.com/index.php?p= ... ls&id=4071 scripts without permissions: https://community.multitheftauto.com/index.php?p= ... ls&id=4077 https://community.multitheftauto.com/index.php?p= ... ls&id=4063
-
u can try listen2myradio or set up a own shoutcast or icecast.
-
Read his post in a sarcastic tone. Yeah, but see the spoiler /sarcasm off
-
can u show me the code arezu? edit: i searched for it to
-
When comes the official mta 1.3.1 [ i know only that 1.4 comes in the summer ]
-
Hey, i was looking just for a function which is stopping the download thing, then i found this: downloadFile() but How does it exactly work? does it download the textures? or is it canceling the download files? caus i have got hmm, 100 mb on car mods but i wanna stop it, but i want that the cars are on for evryone, so not stopping the download is it possible?
-
Nice, HARDSTYLE MAP!
-
i only forgot -- ... let's stop the fight
-
no I mean, onClientRender keeps dxDrawText visible, so whatever you're drawing, use onClientRender like this within the main function/eventhandler function createText ( ) -- add your code here function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) ... function createText ( ) -- add your code here -- ur forgot a END end function TheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, TheRendering ) and if u wanna stop rendering function stopTheRendering ( ) removeEventHandler ( "onClientRender", root, createText ) --now removing the eventhandler end addCommandHamdler ( "stoprender", stopTheRendering )
-
Here u can find some scripts. https://community.multitheftauto.com/index.php?p=resources or learn it https://wiki.multitheftauto.com/wiki/Scr ... troduction edit** i wanna only help. so don't be negative on me.
-
I just wanted to ask, how can you know that he didn't model the car himself? To me the vehicle seems pretty much different from the in-game one. Just check this one out, there you have some hardstyle. https://www.youtube.com/watch?v=iFODHMVS_L0 Thanks :D:D will play it in ur server. Regards, Denz
