-
Posts
877 -
Joined
-
Last visited
Everything posted by denny199
-
It doesn't work error: [13:14:08] ERROR: mapmanager\mapmanager_exports.lua:64: mapmanager: Invalid map specified.
-
That's not the problem He want That if a palyer hits a marker that the GUI popout, use server side code: marker1 = createMarker (0, 0,1,"cylinder",1.2,0,0,225,100) --idk where the marker must be so 0, 0, 0 addEventHandler ("onMarkerHit",marker1, function (hitPlayer) triggerClientEvent (hitPlayer,"showMission1",getRootElement(),hitPlayer) end addEventHandler("onMarkerLeave",marker1, function (leavePlayer) triggerClientEvent(leavePlayer,"unshowMission1",leavePlayer) end) works for me
-
Hi there I've got some problems with my map shop it works perfectly If I'm admin But Not When i'm not Admin how can i resolve it? Example: I clicking on the button with admin account it's working perfectly with a non mod/admin account it don't set the next map But i want that evrybody can set a map Code: Client: -- GUI things and much more u don't need addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == GUIEditor_Button[1]) then outputChatBox("Button Is here") mapName = guiGetText ( GUIEditor_Edit[1] ) triggerServerEvent ("nm", getLocalPlayer(), mapName) end end) server: --import map functions u not needing function snm(mapName) outputChatBox("Trigger Is working") executeCommandHandler("nextmap", source, mapName) end addEvent("nm", true) addEventHandler("nm", getRootElement(),snm) executeCommandHandler("nextmap", source, mapName) --This works perfectly with admin but not if i'm logged out/logged in with a non amdin/mod/smod account Greetings Danny
-
I had got the same problem but now it's giving a bad argumant @ "fileOpen", in the resource download mayby you could make a example script and upload it on the community
-
For the 1.1 i've make any changes, you can download the PHP files here: Download link This is the PHP SDK library of MTA. I've include it on the PHP files. Community page Where i can locate MTA sdk in MTA folder ? Well mayby u hosting with 000webhost then u can uplaod it to the ftp then your'e website in: public_html you need make a new map like mail or something Then in that's map upload the mail.php and the MTA_SDK.php then u go to the script server side then put your'e website link there like this: callRemote ( "http://www.yourwebsite.com.com/mail/mail.php", mail_return, player, mail_target, mail_subject, mail_message ) -- sorry for the ehm, fucked up english, I'ts 6:50 now
-
MTA_SDK.php What's the php code off it?
-
Hey, can you send the new php code?, caus if got edited [ only the image and upload on my own web] then it gaves an error help?
-
See this, i made it , u meaning like that't?, mayby i will release it just skip it for nitro colors
-
function warp( player, command, who ) local target = getPlayerFromName ( who ) if ( target ) then local x,y,z = getElementPosition ( target ) setElementPosition( player, x, y, z ) end end addCommandHandler ( "warp", warp )
-
Mayby i could get some help ?
-
[lua]local x,y,z = getElementPosition(cH) lua] Who cH ? give arguments like: ch = getLocalPlayer()
-
So?, No error but no sound, cheked evrything mta sound = on mij own sound = on Client Side local soundss = {} function startSirene ( vehicle, the_file_path ) local x,y,z = getElementPosition ( vehicle ) local path = playSound3D ( the_file_path, x, y, z, true ) --the_file_path variable must be supplied, huh. attachElements ( path, vehicle ) soundss [ vehicle ] = path end addEvent( "onNewRadioCreate", true ) addEventHandler ( "onNewRadioCreate", getRootElement(), startSirene ) ServerSide 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 if name == "name" then stationName = value elseif name == "the_file_path" then stationPath = value end end stations[stationName] = stationPath table.insert (stationsNames, 1, stationName) end table.sort (stationsNames) end end loadStations () function createRadio (player, station) if station then local the_file_path = stations[station] if the_file_path then local commandantje = getPedOccupiedVehicle(player) if ( commandantje ) 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 triggerClientEvent ( "onNewRadioCreate", getRootElement(), commandantje, the_file_path ) outputChatBox ("New station: " .. station .. " created, the_file_path: " .. tostring(stationPath), player, 0,220,0) table.insert (radios, 1, {newX, newY, newZ, the_file_path}) else outputChatBox ("error", player, 220, 0, 0) end end else outputChatBox ("error", player, 220, 0, 0) end end addEvent ("onClientRadioCreate", true) addEventHandler ("onClientRadioCreate", getRootElement(), createRadio) function onJoin (player) if radios then triggerClientEvent (player, "sendAllRadios", getRootElement(), radios, stationsNames, stations) end end addEvent ("requestForRadios", true) addEventHandler ("requestForRadios", getRootElement(), onJoin) XML: "Kwejk fm" path="http://fm.kwejk.pl/kwejkfm_aac.m3u"/> "Dubstep, drum and bass" path="http://dubstep.fm/listen.pls" /> "Best blues station" path="http://64.62.252.130:9032/listen.pls" /> "Classic music" path="http://sc1.abacast.com:8220/listen.pls" /> "Country" path="http://shoutcast.internet-radio.org.uk:10656/listen.pls" /> "Electro, dance, house" path="http://stream.electroradio.ch:26630/listen.pls" /> "90s grunge rock" path="http://173.193.14.170:8006/listen.pls" /> "Rock, metal and alternative" path="http://screlay-dtc0l-1.shoutcast.com:8012/listen.pls" /> "60s 70s 80s 90s rock" path="http://cp.internet-radio.org.uk:15476/listen.pls" /> "Pop, dance, trance" path="http://cp.internet-radio.org.uk:15114/listen.pls" /> "Psychodelic and Progressive rock" path="http://krautrock.pop-stream.de:7592/listen.pls" /> "Hip hop, rap, rnb" path="http://mp3uplink.duplexfx.com:8054/listen.pls" /> "Rave" path="http://www.rave.ca:8000/listen.pls" /> "Fear.fm hard" path="http://www.fear.fm/streamrelay/playlist/hard.pls" /> "Fear.fm harder" path="http://www.fear.fm/streamrelay/playlist/harder.pls" /> "Fear.fm hardest" path="http://www.fear.fm/streamrelay/playlist/hardest.pls" /> "Q - music" path="http://www.q-music.nl/asx/q-music.asx" /> "538 non- stop" path="http://82.201.100.10:8000/RD02_NonStop40.m3u" /> "538 juize" path="http://82.201.100.9:8000/IPAD_538JUIZE.m3u" /> "Slam Fm" path="http://www.true.nl/streams/slamfmlivestream.asx" /> "538 party" path="http://82.201.100.10:8000/WEB16.m3u" />
-
Well, the sound exists and the car to buy bad argument @ attachElements local soundss = {} function startSirene ( vehicle ) local x,y,z = getElementPosition( vehicle ) local path = playSound3D( path, x, y, z, true) attachElements ( path, vehicle) soundss [ vehicle ] = path end addEvent( "onNewRadioCreate", true ) addEventHandler("onNewRadioCreate", getRootElement(), startSirene)
-
Well, it's saying that's the vehicle exists now i gonna test the sound
-
u meaning this?: -- serverside function hit ( player ) setElementPosition ( player, x, y, z ) -- put your'e own position in it setElementDimension ( player, dimensionidhere ) -- dimensionid here setElementInterior ( player, intID ) -- interior id here end function open () local marker = createMarker ( x, y, z ) -- put your'e own position in it where you wanna have the marker outputChatBox ( "The deathmatch arena is open!" ) addEventHandler ( "onMarkerHit", marker, hit ) end addCommandHandler ( "opendeatmatch", open ) function close () outputChatBox ( "The deathmatch arena is closed!" ) destroyElement ( marker ) end addCommandHandler ( "closedeatmatch", close )
-
Well , the sounds exists, but what do you exatly mean with the car I'm in a car So....
-
Well heres by radio.xml: These radio are all exist! and they are all into the gridlist "Kwejk fm" path="http://fm.kwejk.pl/kwejkfm_aac.m3u"/> "Dubstep, drum and bass" path="http://dubstep.fm/listen.pls" /> "Best blues station" path="http://64.62.252.130:9032/listen.pls" /> "Classic music" path="http://sc1.abacast.com:8220/listen.pls" /> "Country" path="http://shoutcast.internet-radio.org.uk:10656/listen.pls" /> "Electro, dance, house" path="http://stream.electroradio.ch:26630/listen.pls" /> "90s grunge rock" path="http://173.193.14.170:8006/listen.pls" /> "Rock, metal and alternative" path="http://screlay-dtc0l-1.shoutcast.com:8012/listen.pls" /> "60s 70s 80s 90s rock" path="http://cp.internet-radio.org.uk:15476/listen.pls" /> "Pop, dance, trance" path="http://cp.internet-radio.org.uk:15114/listen.pls" /> "Psychodelic and Progressive rock" path="http://krautrock.pop-stream.de:7592/listen.pls" /> "Hip hop, rap, rnb" path="http://mp3uplink.duplexfx.com:8054/listen.pls" /> "Rave" path="http://www.rave.ca:8000/listen.pls" /> "Fear.fm hard" path="http://www.fear.fm/streamrelay/playlist/hard.pls" /> "Fear.fm harder" path="http://www.fear.fm/streamrelay/playlist/harder.pls" /> "Fear.fm hardest" path="http://www.fear.fm/streamrelay/playlist/hardest.pls" /> "Q - music" path="http://www.q-music.nl/asx/q-music.asx" /> "538 non- stop" path="http://82.201.100.10:8000/RD02_NonStop40.m3u" /> "538 juize" path="http://82.201.100.9:8000/IPAD_538JUIZE.m3u" /> "Slam Fm" path="http://www.true.nl/streams/slamfmlivestream.asx" /> "538 party" path="http://82.201.100.10:8000/WEB16.m3u" /> this is my attachements script: -- client side local sounds = {} function startSirene ( vehicle ) local x,y,z = getElementPosition( vehicle ) local sirene = playSound3D (path, x,y,z) attachElements ( sirene, vehicle) sounds [ vehicle ] = sirene end addEvent ("onNewRadioCreate", true) addEventHandler ("onNewRadioCreate", getRootElement(), startSirene) and this is my triggering: triggerClientEvent ( "onNewRadioCreate", getRootElement(), commandantje, path )
-
Still don't work bad Argument @ attachElements
-
I got now other problem, i wanna attach music on the car, that evrybody can hears but now this: bad argument attachElements code: -- client side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[11] = guiCreateWindow(436,285,486,412,"Boxen In Auto -- BIA",false) GUIEditor_Button[7] = guiCreateButton(21,40,175,49,"Box Links",false,GUIEditor_Window[11]) GUIEditor_Button[8] = guiCreateButton(251,40,175,49,"Box Rechts",false,GUIEditor_Window[11]) GUIEditor_Button[12] = guiCreateButton(120,100,175,40,"Instalatie",false,GUIEditor_Window[11]) GUIEditor_Button[10] = guiCreateButton(251,274,175,49,"Close",false,GUIEditor_Window[11]) grid = guiCreateGridList(21,144,183,259,false,GUIEditor_Window[11]) column = guiGridListAddColumn(grid,"Radio stations",0.9) guiSetVisible(GUIEditor_Window[11],false) button3 = guiCreateButton(251,154,175,49,"Play",false,GUIEditor_Window[11]) -- i know from the sirene script local sounds = {} function startSirene ( vehicle ) local x,y,z = getElementPosition( vehicle ) local sound = playSound3D (path, x,y,z) attachElements ( sirene, vehicle, 0, -3, 0) sounds [ vehicle ] = sirene end addEvent ("onNewRadioCreate", true) addEventHandler ("onNewRadioCreate", getRootElement(), startSirene) function onStart () triggerServerEvent ("requestForRadios", getLocalPlayer(), getLocalPlayer()) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), onStart) function onJoin (radia, names, st) for k,v in ipairs(radia) do local sound = playSound3D (v[4], v[1], v[2], v[3]) setSoundMaxDistance (sound, 20) end stationsNames = names stations = st for k,v in ipairs(stationsNames) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, column, v, false, false ) end end addEvent ("sendAllRadios", true) addEventHandler ("sendAllRadios", getRootElement(), onJoin) function bia() guiSetVisible (GUIEditor_Window[11],true) showCursor(true) end addCommandHandler ( "biaa", bia ) addEventHandler("onClientGUIClick",getRootElement(), function (player, button, state, x,y) if (source == GUIEditor_Button[11]) then guiSetVisible (GUIEditor_Window[11],false) showCursor (false) elseif (source == GUIEditor_Button[7]) then money = getPlayerMoney (source) if (money < 0) then outputChatBox ("U heeft niet genoeg geld!",225,0,0) else player = getLocalPlayer() outputChatBox ("Box Gemaakt!",225,0,255) triggerServerEvent ( "boksL", getLocalPlayer(), getLocalPlayer()) end elseif (source == GUIEditor_Button[8]) then money = getPlayerMoney (source) if (money < 0) then outputChatBox ("U heeft niet genoeg geld!",225,0,0) else player = getLocalPlayer() outputChatBox ("Box Gemaakt!",225,0,255) triggerServerEvent ( "boksR", getLocalPlayer(), getLocalPlayer()) end elseif (source == GUIEditor_Button[12]) then money = getPlayerMoney (source) if (money < 0) then outputChatBox ("U heeft niet genoeg geld!",225,0,0) else player = getLocalPlayer() outputChatBox ("Box Gemaakt!",225,0,255) triggerServerEvent ( "instal", getLocalPlayer(), getLocalPlayer()) end elseif (source == button3) then guiSetVisible (GUIEditor_Window[11],false) showCursor (false) local selected = guiGridListGetSelectedItem (grid) if selected then local stationName = guiGridListGetItemText (grid, selected, column) if stationName then triggerServerEvent ("onClientRadioCreate", getLocalPlayer(), getLocalPlayer(), stationName) elseif (source == GUIEditor_Button[10]) then money = getPlayerMoney (source) if (money < 0) then outputChatBox ("U heeft niet genoeg geld!",225,0,0) else guiSetVisible (GUIEditor_Window[11],false) showCursor (false) end end end end end) -- server side --i know from radio3d script 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 --outputChatBox ("name = " .. tostring(stationName) .. ", path = " .. tostring(stationPath)) stations[stationName] = stationPath table.insert (stationsNames, 1, stationName) end table.sort (stationsNames) end end loadStations () function createRadio (player,station) if station then local stationPath = stations[station] if stationPath then local commandantje = getPedOccupiedVehicle(player) if ( commandantje ) 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 triggerClientEvent ( "onNewRadioCreate", getRootElement(), commandantje, path, attachElements, commandantje, path, vehicle, player, vehicle, sirene ) outputChatBox ("New station: " .. station .. " created, path: " .. tostring(stationPath), 0,220,0) table.insert (radios, 1, {newX, newY, newZ, path}) -- zapisuje informacje o radiu dla nowych graczy else outputChatBox ("error", player, 220, 0, 0) --outputChatBox ("You choose wrong station, avaible stations:", player, 220, 0, 0) --for k,v in ipairs(stationsNames) do --outputChatBox ("-" .. v, player) end end else outputChatBox ("error", player, 220, 0, 0) --outputChatBox ("Choose radio to create, avaible stations:", player,220,0,0) --for k,v in ipairs(stationsNames) do -- outputChatBox ("-" .. v, player) --end end end addEvent ("onClientRadioCreate", true) addEventHandler ("onClientRadioCreate", getRootElement(), createRadio) --addCommandHandler ("radio", createRadio) function onJoin (player) if radios then triggerClientEvent (player, "sendAllRadios", getRootElement(), radios, stationsNames, stations) end end addEvent ("requestForRadios", true) addEventHandler ("requestForRadios", getRootElement(), onJoin)
-
Hi there I was making a system to add speakers to your'e car now I've got made a GUI but now work that anoying button not, who can help me, i triggering it to server side but then an error bad Argument@ attachElements&getPedOccupiedVehicle code: --Client Side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(436,285,486,412,"Boxen In Auto -- BIA",false) GUIEditor_Button[7] = guiCreateButton(21,40,175,49,"Box Links",false,GUIEditor_Window[1]) GUIEditor_Button[8] = guiCreateButton(251,40,175,49,"Box Rechts",false,GUIEditor_Window[1]) GUIEditor_Button[10] = guiCreateButton(251,274,175,49,"Close",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(21,144,183,259,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiSetVisible(GUIEditor_Window[1],false) guiGridListAddColumn(GUIEditor_Grid[1],"Muziek",0.2) for i = 1, 1 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemColor(GUIEditor_Grid[1],0,1,255,0,0,255) GUIEditor_Button[9] = guiCreateButton(251,154,175,49,"Play",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(258,231,182,80,"Dit is nog de Beta Versie",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255, 0 ,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") function bia() guiSetVisible (GUIEditor_Window[1],true) showCursor(true) end addCommandHandler ( "bia", bia ) addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == GUIEditor_Button[7]) then money = getPlayerMoney (source) if (money < 0) then outputChatBox ("U heeft niet genoeg geld!",225,0,0) else player = getLocalPlayer() outputChatBox ("Box Gemaakt!",225,0,255) triggerServerEvent ( "boksL", getLocalPlayer(), "attachElements", "getPedOccupiedVehicle" ) end elseif (source == GUIEditor_Button[10]) then money = getPlayerMoney (source) if (money < 0) then outputChatBox ("U heeft niet genoeg geld!",225,0,0) else guiSetVisible (GUIEditor_Window[1],false) showCursor (false) end end end) --Server Side function boxl ( player, seat, jacked, vehicle ) local bestuurderr = getPedOccupiedVehicle(player) local box = createObject ( 2232, 0, 0, 0 ) attachElements ( box, bestuurderr, 0.49, -1.8, 0.2, 0, 0, -20 ) setObjectScale ( box, 0.4 ) setElementCollisionsEnabled(box, false) end addEvent( "boksL", true ) addEventHandler( "boksL", getRootElement(), boxl )
-
Hi there, IDK if I'm in the good tropic but this my editor is not good [ i reinstalled mta to] It''s don't saving maps and can't opening maps Picutre: link: http://imageshack.us/photo/my-images/221/43829231.png
-
Tnx Arezu and the other, I had a mistake in attachElements, I need attach the vehicle to the object, now it ill move correct but tnx arezu for you fantastic help and the others ofcourse. Regards, Danny!
