Jump to content

5150

Members
  • Posts

    352
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 5150

  1. you know what... i thought it worked because i tested it with another staff member without playercolors and it worked, but now player colors is on with the admin tags and im getting them again
  2. cool, it worked thanks
  3. i was looking to stop the double messages when i start my admin tags resource. player names are okay, but for admins it sends one colored, and one tagged message. does this script stop that?
  4. yeah yeah i know this post has probably been posted about 42 million times, but none of the posts give a straight forward answer... so i have admin tags, and i get double messages on the admin messages. i want to combine playercolors and my admin script into one resource if possible, but honestly all i want is to have tags while my players have colors. heres the admin tag script, and playercolors Playercolors local lowerBound,upperBound = unpack(get"color_range") g_Root = getRootElement () g_ResourceRoot = getResourceRootElement ( getThisResource () ) addEventHandler ( "onResourceStart", g_ResourceRoot, function() for i,player in ipairs(getElementsByType"player") do processPlayer ( player ) end end ) function processPlayer ( player ) player = player or source local r, g, b = math.random(lowerBound, upperBound), math.random(lowerBound, upperBound), math.random(lowerBound, upperBound) setPlayerNametagColor(player, r, g, b) end addEventHandler ( "onPlayerJoin", g_Root, processPlayer ) addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerColor(source) local name = getPlayerName(source) local msg = msg:gsub('#%x%x%x%x%x%x', '') outputChatBox( name.. ': #FFFFFF' .. msg, g_Root, r, g, b, true) outputServerLog( "CHAT: " .. name .. ": " .. msg ) end end ) getPlayerColor = getPlayerNametagColor getPlayerColour = getPlayerNametagColor admin tags function chatbox(text, msgtype) local root = getRootElement() local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) if (msgtype == 0) then if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then cancelEvent(true) outputChatBox("#990000|OWNER| #999999" .. name .. ":#f7fc00 " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #990000~|OWNER|~ " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox("#000000~SuperModerator~ #66FF00" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #00a2fc~SuperModerator~" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then cancelEvent(true) outputChatBox("#3366ff~Moderator~ #00ff00" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #00ff00~Moderator~ " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Trainee")) then cancelEvent(true) outputChatBox(" #FFFF00~Trainee~ " .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #FFFF00~Vip~" .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then cancelEvent(true) outputChatBox(" #00a2fc~|OWNER|~ " .. name .. ":#f7fc00 " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: #00a2fc~|OWNER|~" .. name .. ": " .. text) end elseif (msgtype == 2) then end end addEventHandler("onPlayerChat", root, chatbox) function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
  5. how can i make a spawn point that only a certain team will go to? i want my americans team to spawn in certain locations, and my germans team to spawn in other locations
  6. 5150

    MG nest

    all i want is a minigun that will shoot and rotate, and can be placed with coordinates.... i didnt know it was this hard
  7. 5150

    MG nest

    i know basic scripting and some meanings, im still learning how to put it all together though. like, i could make a gate script (simple and complex), a script to create an object or ped and give the ped a weapon, animation, or clothing... i could edit scripts just fine as well, but its harder for me to create scratch ones
  8. 5150

    MG nest

    ahh ok. so theres a ton of things wrong with that lol. ok, well is it worth the time to edit this script or should i just make a new one
  9. 5150

    MG nest

    fine. i found a script on wiki that is similar but i dont know why it doesnt work. just check it for me function arma() minigun = createWeapon("minigun", 1, 1, 3)--Create the weapon setWeaponClipAmmo(minigun, 99999) setWeaponState(minigun, "firing") setWeaponProperty(minigun, "fire_rotation", 0, -30, 0) dueno = getWeaponOwner(minigun)--This gets the owner outputChatBox(tostring(dueno))--And this say it in the chatbox end addCommandHandler("weapon", arma)--CommandHandler i changed the weapon owner (dueno) to my account name (guitarist5150) and set the coordinates to where i was standing but no luck. also is there a way for infinite ammo? instead of 9999
  10. 5150

    MG nest

    i do not want something from the community... i could just find that myself. i want to see who can help me create it
  11. 5150

    MG nest

    yeah... you arent really understanding. i need a script that will create a minigun and rotate according to where the player moves. the video was just to show you what i meant by "trailing" the player (in the sense that the bullets will not be on-point accuracy, they will have to catch up to the player)
  12. 5150

    MG nest

    is there a script to create a minigun and have it move left to right (back and forth), or have it trail a player in a certain team (only hit if the player stops) while it shoots? so basically a moving, firing minigun that will trail a player in the Americans team... [its for a World War 2 server im working on, and i want autofiring miniguns for the D-Day beach bunkers] please let me know if im not making sense... i feel like im not. this video explains what i mean by trailing:
  13. hey maybe im almost 2 years late but so what. im actually developing a WW2 server as well, similar to yours. i found this post while searching for mods... maybe we could work together? im a good mapper and i can make a basic script...
  14. yes killer. just a colshape where if you enter area 51 or mount chiliad, all vehicles in the shape are locked for my team/group/gang whatever
  15. hi guys, does anyone have a resource or script that will only allow certain vehicles to be locked only for one gang? i dont want EVERY (for example leviathan) in the server to be locked for that team, i just want the vehicles that are inside my base locked. ive tried different resources, but they never work for me... if anyone is awesome enough to help me, here are the vehicles i want locked and what they are named in my server (if it helps): i need them for Psycho Mans Gang our bases are area 51 (restricted area), and mount chiliad ****this is hunter**** ****maverick**** ****hydra**** ****rhino**** i can enter the coordinates to place the vehicles if needed, but could someone set the script up for me? (IDEA) maybe its possible to make a colshape square in the area, to lock every vehicle in that square to a certain gang?
  16. i have a few simple suggestions for map editor in the next mta update... a click/drag so you can select all placed objects or world objects (including the "remove world object" option) within the drag box. sometimes its hard to select certain world objects, and sometimes you just want to delete a whole section of placed objects... easier than doing it one by one a gate maker. everyone finds making gates at least somewhat inconveniant, and i know its possible to add a gate GUI to MTA. you know, let us select our own object to move out of the object list, let us put coords, dimension, speed, etc etc... maybe a little more complicated, im not sure... but add a part to placing peds that allows that ped to repeat a specific animation, or maybe to repeat that animation only when someone comes near the ped (but this is getting more into scripting) thats all i can think of for now. its not much to ask, please someone high up in the MTA chain, consider them they would really come in handy
  17. 5150

    skin selecting

    what do i do with the code and the function? delete a line? add a line?
  18. 5150

    skin selecting

    you know how when you press f1/skins, you can type the skin ID at the bottom of the panel in the little white box? how can i disable that, while still allowing players to select skins by clicking?
  19. 5150

    Blip removal

    ill probably remove the output lol. so it doesnt work on freeroam?
  20. 5150

    Blip removal

    just tried it. i saw the destroyed output in chat but nothing happened
  21. 5150

    Blip removal

    ok it will be several hours before i can test it so just keep an eye on this post and i will tell you if it works
  22. 5150

    Blip removal

    man youre awesome and just to be sure, the whole server will not see PMGs blips or tags when i start this?
  23. 5150

    Blip removal

    im going to post this one more time, because i feel like i didnt explain it well enough last time... does anyone have a script where when you start the resource, blips and nametags for one specific team become invisible, and when you stop the resource, the blips/tags are returned? i want to use it as a stealth feature for my gang. basically i want everyone elses blip/tag to stay the same, but i want the blips/tags for Psycho Mans Gang members to disappear from the map on resource start Thanks for your help
×
×
  • Create New...