Jump to content

greenops011

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by greenops011

  1. So, would something like this work? window.dialog.closeButton = guiCreateButton( 10, 60, width - 20, 40, "Close", false, window.dialog.window ) addEventHandler( "onClientGUIClick", window.dialog.closeButton, function () guiSetVisible( window.dialog.window, false ) destroyElement( window.dialog.window ) window.dialog = { } local sound = playSound("tap.wav") setSoundVolume(sound, 0.5) end , false ) end
  2. So, I'm working on doing some scripting with the MDC in the oG open source scripts. what I'm trying to do is when the person clicks on a button, say, search database, it will play a sound effect, like https://on.soundcloud.com/ZygMG just wondering how I would go about doing that?
  3. Hi again guys. Got another question for you. I want to make a “vehicle booting” system where if someone in the specified towing faction or PD faction wants to boot a vehicle, the vehicle would not be able to move, yet would still be able to turn on. From what I read on the wiki, there is a function that would sort of allow this: function toggleFreezeStatus ( thePlayer ) -- get the vehicle element local playerVehicle = getPlayerOccupiedVehicle ( thePlayer ) if playerVehicle then -- get the current freeze status local currentFreezeStatus = isElementFrozen ( playerVehicle ) -- get the new freeze status (the opposite of the previous) local newFreezeStatus = not currentFreezeStatus -- set the new freeze status setElementFrozen ( playerVehicle, newFreezeStatus ) end end However from what I’m seeing, that only works if a player is in the vehicle. What I’m hoping for is that the towing faction, or even an admin for that matter could type something like: /bootveh <VIN or plate> And it would check the vehlib database for either that VIN or plate, and then do the toggleFreezeStatus to the vehicle. Then if they typed: /unbootveh <VIN or plate> It would set the frozen status to false. Any suggestions on how I would be able to accomplish this? Sorry for creating the multiple topics, I’m a complete noob to scripting, and want to be able to help the community I’m in to be able to develop scripts
  4. Awesome, thanks buddy. Really appreciate it
  5. Hey guys. I’m working on a TP system based off the owlGaming script that was made opensourced on github. I have a question about using multiple command handlers for the same thing. Basically an alias of a command handler. here is of course what the original is: function openLocationManager(thePlayer) if canViewTPS(thePlayer) then triggerClientEvent(thePlayer, "client:openLocationManager", thePlayer, locs) else return nil end end addEvent("server:openLocationManager", true) addEventHandler("server:openLocationManager", root, openLocationManager) addCommandHandler("tps", openLocationManager) Now, if I wanted to add an alias to “tps” would I have to add a second line, so like this: function openLocationManager(thePlayer) if canViewTPS(thePlayer) then triggerClientEvent(thePlayer, "client:openLocationManager", thePlayer, locs) else return nil end end addEvent("server:openLocationManager", true) addEventHandler("server:openLocationManager", root, openLocationManager) addCommandHandler("tps", openLocationManager) addCommandHandler("places", openLocationManager) Or would I just add it as a second string like this: function openLocationManager(thePlayer) if canViewTPS(thePlayer) then triggerClientEvent(thePlayer, "client:openLocationManager", thePlayer, locs) else return nil end end addEvent("server:openLocationManager", true) addEventHandler("server:openLocationManager", root, openLocationManager) addCommandHandler("tps", "places", openLocationManager) Thanks in advance
  6. guessing noone has any thoughts on this?
  7. So I have a Raspberry Pi 3 B+, and I’m wanting to use it to run a small server. Max amount of players I would allow are 6 as it would be a private dev/clan server. These are the specs according to magpi.raspberrypi.com: SoC: Broadcom BCM2837B0 quad-core A53 (ARMv8) 64-bit @ 1.4GHz GPU: Broadcom Videocore-IV RAM: 1GB LPDDR2 SDRAM Networking: Gigabit Ethernet (via USB channel), 2.4GHz and 5GHz 802.11b/g/n/ac Wi-Fi Bluetooth: Bluetooth 4.2, Bluetooth Low Energy (BLE) Do you guys think that would be sufficient enough to run the small server? Don’t know if it would help in determining this, but I’d probably be using the oG roleplay script on the server
  8. awesome, thanks guys. that was really helpful
  9. Not sure if this is the correct place to ask this, but here we go. I'm basically getting started on learning LUA scripting, and am trying to use an old roleplay gamemode to learn. one thing I am wondering is is there a way to find out if one particular lua script depends on another? Basically if I were to take an lua script from one section of the game mode, modify it, and test it stand-alone, I don't want to break the script, so what I'd like to try to do is use notepad++ to search for a particular string (like if the lua file calls a second lua file). Does anyone know what the code I would need to look for is?
  10. Awesome, thanks man. I did set it to run as an admin and that worked. Appreciate the response
  11. So, when I try to start a server, I'm getting an error message [12:05:01] ERROR: Can't parse 'C:\Program Files (x86)\MTA San Andreas Server\server\mods\deathmatch\resource-cache\conf.template' [12:05:01] ERROR: Could not read or create server-id keys file at 'C:/Program Files (x86)/MTA San Andreas Server/server/mods/deathmatch/server-id.keys' [12:05:02] Server stopped! I'm not sure whats going on. Perhaps someone could help. Is there some sort of setting I need to change? Does it have to be run as an admin? Any help would be appreciated
  12. I'm trying to figure out how to change my screenshot save path. in the coreconfig.xml file i changed <screenshot_path>C:\Program Files (x86)\MTA San Andreas 1.5\screenshots</screenshot_path> to <screenshot_path>C:\Users\Owner\MTA screenshots</screenshot_path> and it's still saving to the program files folder. is there another setting I need to change somewhere? btw, when I edited the file, I was using notepad++ as an administrator, and the file/folder perms were configured so it should be able to write to that file, but when I launched MTA, it reverted back to the old path
  13. does anyone know if there is any way to make a server refuse connections from any client who's IP address is listed on a blacklist like spamhaus zen?
  14. I figured it out. It was looking for the VEHTXD2.txd in the GTA San Andreas/Models/Generic/ folder. Once i put that file in there it worked. kinds wierd, but oh well
  15. so my client updated today because of automatic updates. Now whenever i try to connect to a server, it gives me the "Entering game" screen, and then the client freezes. I can't even alt-tab or alt-F4 out of it. I have to Ctrl-Alt-Delete out of it, go to taskmanager and end the proxy_sa.exe process. what the duck is going on? It was working fine yesterday CEGUI log file
×
×
  • Create New...