benwilkins
Members-
Posts
80 -
Joined
-
Last visited
Everything posted by benwilkins
-
ubuntu 64 bit. I've just noticed... loadmodule mta_mysql.so [00:25:40] loadmodule: Requested by Console [00:25:40] MODULE: Unable to find modules/mta_mysql.so (libmysqlclient.so.15: cannot open shared object file: No such file or directory)! [00:25:40] stop: Resource could not be found The file is 100% in the deathmatch/modules folder..
-
Yup: Ive just tested a PHP file on the same server using localhost, root, server (all the same login details) and it connected fine, so its deffinatly an issue with the script, the details are all correct.
-
load mta_mysql.so start mysql [00:13:33] start: Requested by Console [00:13:33] start: Resource is already running restart mysql [00:13:35] restart: Requested by Console [00:13:35] restart: Resource restarting... [00:13:35] Stopping mysql [00:13:35] Starting mysql [00:13:35] ERROR: mysql/connection.lua:16: attempt to call global 'mysql_connect' (a nil value) [00:13:35] mysql restarted successfully
-
-- This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter. --> || (AceMTA.com) || -- ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING - it is generally only needed for professional servers and should be left blank otherwise. This parameter specifies the IP to use for servers that have multiple IP addresses. If left blank, it will default to server's standard local IP address. --> 22003 1024 1 22005 0 8 20 -1 1 [url=https://wiki.multitheftauto.com/wiki/GetPlayerVersion]https://wiki.multitheftauto.com/wiki/GetPlayerVersion[/url] and look like this: 1.1.0-9.03100.0 --> 1 0 -- This parameter reduces the server's bandwidth usage by using various optimizations. Values: none, medium or maximum ; default value: medium --> none -- Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. More infomation about client private files can be found here: [url=https://wiki.multitheftauto.com/wiki/Filepath]https://wiki.multitheftauto.com/wiki/Filepath[/url] Keep a backup of this file in a safe place. Default value: server-id.keys--> server-id.keys -- Specifies the location and name of the main server log file. If left blank, server won't be saving this file. --> logs/server.log -- As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used --> logs/server_auth.log -- This parameter specifies the location and name of the Access Control List settings file. If left blank, server will use acl.xml file, located in the same folder as this configuration file. --> acl.xml -- Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file. --> logs/scripts.log -- Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0. --> 3 -- Specifies the level of the html debug. Available values: 0, 1, 2, 3. When not set, defaults to 0. --> 0 -- Specifies the frame rate limit that will be applied to connecting clients. Available range: 25 to 100. Default: 36. --> 100 -- Specifies whether or not players should automatically be logged in based on their IP adresses --> 0 -- This parameter specifies whether or not to enable player voice chat in-game Values: 0 - disabled , 1 - enabled --> 1 -- This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1 --> 2 -- This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat Available range: 0 to 10. Default - 4 --> 5 -- Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care. --> -- --> -- Specifies the module(s) which are loaded with the server. To load several modules, add more parameter(s). Optional parameter. --> "mta_mysql.so" /> "global" startup="1" protected="0" /> "mysql" startup="1" protected="0" /> "account-system" startup="1" protected="0" /> "pool" startup="1" protected="0" /> "rangeban-system" startup="1" protected="0" /> "glue-system" startup="1" protected="0" /> "superman" startup="1" protected="0" />
-
When resource starts I get this: [23:56:00] ERROR: mysql/connection.lua:16: attempt to call global 'mysql_connect' (a nil value) Line 16: MySQLConnection = mysql_connect(hostname, username, password, database, port) And then: local hostname = get( "hostname" ) or "localhost" local username = get( "username" ) or "root" local password = get( "password" ) or "xxxxxxxxx" local database = get( "database" ) or "server" local port = tonumber( get( "port" ) ) or 3306 Whats wrong?
-
giovanna = createPed(258, 2135.662109375, -1739.5107421875, 17.281345367432) setElementInterior(giovanna, 0) setElementDimension(giovanna, 0) setPedFrozen(giovanna, true) setPedAnimation (giovanna, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, false, false, false ) setPedRotation(giovanna, 87) setElementFrozen(giovanna, true) He spawns, but wont sit..
-
I am having a problem with my bindings. I have the Local function working fine, so I can type in console.. Local asdasd, and it will display asdasd in the chat. But when use this in the client scripts: bindKey("l", "down", "chatbox", "Local") It won't open the chatbox for the local text.. Any ideas?
-
How do I go about making "Online" as Green? guiGridListSetItemText(gMemberGrid, row, colOnline, "Online" , false, false)
-
Thanks Snake. It worked perfect the first time, but then hooked it up again, and now it wont detach at all, but still says It was detached in chatbox.
-
Its not the command, its nothing to do with the detach function, that works fine, I need a way to stop it from reataching, once the detach function has been completed, it will just assume your vehicle is there to attach again.
-
I have this function working fine: function detachVehicle(thePlayer) if isPedInVehicle(thePlayer) and getPedOccupiedVehicleSeat(thePlayer) == 0 then local veh = getPedOccupiedVehicle(thePlayer) if getVehicleTowedByVehicle(veh) then detachTrailerFromVehicle(veh) outputChatBox("The trailer was detached.", thePlayer, 0, 255, 0) else outputChatBox("There is no trailer...", thePlayer, 255, 0, 0) end end end addCommandHandler("detach", detachVehicle, false, false) The only problem is when the command detach is given, it will detach fine, but will reatch almost instantly. So I need a way to stop the trailing from attaching for 2/3 seconds.
-
OK i have set up a client script where a command will play the sound to the local client. Ive never worked with playSound3D. How can I make it so that if someone types /alarm, then the whole server will hear it not just the local player who typed it?.. Code: function bankalarm () Alarm = playSound3D("alarm.wav", -2649.9130859375, 376.15625, 6.15625, true) setSoundVolume(Alarm, 3) setSoundMaxDistance(Alarm, 100) Alarm2 = playSound3D("alarm.wav", 2328.638671875, 2367.5283203125, 2022.92578125, true) setSoundVolume(Alarm2, 3) setSoundMaxDistance(Alarm2, 100) setElementInterior ( Alarm2, 0 ) setElementDimension ( Alarm2, 5 ) outputChatBox("Playing", getRootElement(), 255, 255, 0) end addCommandHandler("alarm", bankalarm) function stopAlarm () stopSound( Alarm ) stopSound( Alarm2 ) outputChatBox("Stopped", getRootElement(), 255, 255, 0) end addCommandHandler("stopalarm", stopAlarm)
-
I tested this all day earlier. I got the two nodes via the command, put them in the text in the format of: { 10000, 20000 }, But say I was on the road, inbetween the two points that I put in the script, nothing would display, even if I sat on the first node, eg: 10000. Still the speed limit wouldnt display. Thats what I am stuck on. But I know the script is working perfectly, as I tested the roads in LS that was already pre-configured.
-
Thats the only script, there is one more that contains the simple Speedo, and the speedimit inside it but that has nothing to do with the location of the nodes, that simply draws a box containing the speed limit. EG: If I go to the LS places where I know the speedlimits display, they will actually display, so its just a point of working out the above code, and how to change them, I just need to figure out the nodes, and weather my theroy of one node at the start of the road and one at the end is correct. This is the only resource that contains anything about the speed limits except for the speedo.
-
We got this script from someone who ustu run it in Los Santos, but now were out in the country we need to change the nodes to the roads we want to dispay the speed limits. I just have no idea how the script works, Obviously I type /speednode where I want the road to start, then again where it ends, and by my understanding, that is the two nodes ( node1, node2) and then whatever is in between will be the speed limit area, and should display the speed limit, but it doesnt.
-
addCommandHandler("speednode", function() if exports.global:isPlayerScripter(getLocalPlayer()) then outputChatBox(findNodeClosestToPoint(vehicleNodes, getElementPosition(getLocalPlayer())).id) end end ) local speedlimits90 = { -- node1, node2 { 786819, 1311230 }, { 786747, 852334 }, { 786741, 852258 }, { 786817, 786715 }, { 1311150, 786827 }, { 786827, 786818 }, } for _, node in ipairs( speedlimits90 ) do local path = calculatePathByNodeIDs( node[1], node[2] ) for key, value in ipairs(path) do value.speedlimit = 90 -- createBlip( value.x, value.y, value.z, 0, 1, 0, 255, 0 ) end end local speedlimits120 = { { 786747, 721310 }, { 786741, 721310 }, { 983594, 983587 }, { 983587, 918112 }, { 918112, 1441850 }, } for _, node in ipairs( speedlimits120 ) do local path = calculatePathByNodeIDs( node[1], node[2] ) for key, value in ipairs(path) do value.speedlimit = 120 -- createBlip( value.x, value.y, value.z, 0, 1 ) end end setTimer( function() local x, y, z = getElementPosition(getLocalPlayer()) setElementData( getLocalPlayer(), "speedo:limit", x > 50 and y < -650 and (findNodeClosestToPoint(vehicleNodes, x, y, z).speedlimit or 60), false) end, 500, 0 ) Above is the script that outputs the speedlimit to the client, we understand that typing /speednode will display the current node, but I do not have any idea how to configure it out. Im trying to script it for a friend of mine, and said I will ask here, as I have never worked with nodes before.
-
Hey, was wondering if anyone has a code for the object of the San Fierro Police Garage gate. All of the gate objects i found are too small.
-
function makeTrain(source) tram = createVehicle(449,-2265.34, 548.89, 35) setTrainDerailable(tram, false) local pilot1 = createPed(241,1693.38,-1959,15.6) warpPedIntoVehicle (pilot1, tram) setTrainSpeed(tram, 0.3) end addCommandHandler("maketram", makeTrain) The tram spawns, will go for about 2 seconds, and then stops still. How can I make it contiunally at 0.3 speed?
-
Tried it, and can not enter as a passenger. Also had to remove a ] from line 34, as there was one too many. Any help anyone?
-
Ah cool, if you would like to gimme some help when your at your PC then would be more than appreciated dude.
-
Hey, I want to put the trams into action on an RP server. At the moment no passengers can enter them. Is there any scripts avaliable to solve this problem and let around 5 passengers on board?
-
How do I check if a vehicle is an emergency vehicle.
benwilkins replied to benwilkins's topic in Scripting
It doesnt work: Line 23: Expected } near = Tried debuging myself but no look. -
How do I check if a vehicle is an emergency vehicle.
benwilkins replied to benwilkins's topic in Scripting
Care to take a qucik look? Didnt actually make the script, my friend did it, but hes been away for a good few weeks. I have also tried, checking if the vehicle has sirens, and if so then allow the script to work. Heres the script function setBinds() end function setBindsTwo() local players = getElementsByType("player") for k, v in ipairs(players) do bindKey(v, "p", "down", delayedEMToggle) end end addEventHandler("onPlayerJoin", getRootElement(), setBinds) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), setBindsTwo) function toggleVehicleLights(ply, key, state) local vehicle = getPedOccupiedVehicle(ply) if vehicle then if getVehicleOverrideLights(vehicle) ~= 2 then setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle, 1) end end end function delayedEMToggle(ply, key, state) setTimer(toggleEmergencyLights, 200, 1, ply, key, state) end local colorTimers = {} local stroboTimers = {} function toggleEmergencyLights(ply, key, state) local vehicle = getPedOccupiedVehicle(ply) if not vehicle then return end if colorTimers[tostring(vehicle)] == nil and stroboTimers[tostring(vehicle)] == nil then -- start timers to flash lights with colors -- 1. timer to change color AND left/right simultaneously -> left = blue, right = red -- 2. timer to flash on/off in a strobo fashion colorTimers[tostring(vehicle)] = setTimer(sirenColorTick, 900, 0, vehicle) stroboTimers[tostring(vehicle)] = setTimer(sirenStroboTick, 90, 0, vehicle) elseif colorTimers[tostring(vehicle)] ~= nil and stroboTimers[tostring(vehicle)] ~= nil then -- stop timers, clear light colors and statuses killTimer(colorTimers[tostring(vehicle)]) killTimer(stroboTimers[tostring(vehicle)]) colorTimers[tostring(vehicle)] = nil stroboTimers[tostring(vehicle)] = nil setVehicleHeadLightColor(vehicle, 255, 255, 255) setVehicleOverrideLights(vehicle, 2) setVehicleLightState(vehicle, 0, 0) setVehicleLightState(vehicle, 1, 0) end end function sirenColorTick(vehicle) local r, g, b = getVehicleHeadLightColor(vehicle) if g > 0 or b > 0 then setVehicleHeadLightColor(vehicle, 255, 0, 0) setVehicleLightState(vehicle, 0, 0) setVehicleLightState(vehicle, 1, 1) elseif r > 0 then setVehicleHeadLightColor(vehicle, 0, 0, 255) setVehicleLightState(vehicle, 0, 1) setVehicleLightState(vehicle, 1, 0) end end function sirenStroboTick(vehicle) if getVehicleOverrideLights(vehicle) == 2 or getVehicleOverrideLights(vehicle) == 0 then setVehicleOverrideLights(vehicle, 1) else setVehicleOverrideLights(vehicle, 2) end end -
I have an emergency lights for the front headlights, but at the moment, it can be activated in any vehicle.
-
BUG: If you set a key to something like: key. When you try to enter it, it brings up the chat box behind it and you cant enter anything into the key box. It seems, that if the key box is up, it doesnt disable any other keystroke actions within mta. EG: If I have a password with the letter P, i will type p in the key prompt, and it brings up the admin panel behind it.
