Jump to content

Eshtiz

Members
  • Posts

    74
  • Joined

  • Last visited

Everything posted by Eshtiz

  1. Eshtiz

    BankMoney

    Hello, I'm currently on vG scripts, 1.1.1 and I'm on the default HUD for MTA/GTA SA. I'm trying to figure out how to add Bank Money balance under your pocket money (big green $$), I have been searching a lot on the internet but it's FREAKING impossible to find it because when I use the keyword 'BANK' I get a LOT of banks located in my native country, is there anyone who could help me out/link or whatever, it's impossible to find the right things nowadays.
  2. Eshtiz

    New chat

    Here: function infochat( thePlayer, commandName,... ) if exports.global:isPlayerBronzeDonator( thePlayer ) or exports.global:isPlayerAdmin( thePlayer ) then local tArgs = { ... } if #tArgs == 0 then outputChatBox( "SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14 ) else local message = table.concat( tArgs, " " ) local title = "" local hidden = getElementData( thePlayer, "hiddenadmin" ) or 0 if exports.global:isPlayerAdmin( thePlayer ) then if hidden == 1 or exports.global:getPlayerAdminTitle( thePlayer ) == "Player" then if not exports.global:isPlayerBronzeDonator( thePlayer ) then title = "Bronze Donator" else title = exports.global:getPlayerDonatorTitle( thePlayer ) end else title = exports.global:getPlayerAdminTitle( thePlayer ) end elseif exports.global:isPlayerBronzeDonator( thePlayer ) then title = exports.global:getPlayerDonatorTitle( thePlayer ) end for key, value in pairs( getElementsByType 'player' ) do if exports.global:isPlayerBronzeDonator( value ) or exports.global:isPlayerAdmin( value ) then if getElementData( value, "infochat" ) == 1 then outputChatBox( "[Donator] " .. title .. " " .. getPlayerName( thePlayer ) .. ": " .. message, value, 160, 164, 104 ) end end end end end end addCommandHandler( "i", infochat, false, false ) addCommandHandler( "info", infochat, false, false ) addCommandHandler( "ichat", infochat, false, false ) It's the fifth 'end'
  3. Eshtiz

    New chat

    Yeh, you're right, the bug message is gone, but there's no chat, only syntax.
  4. Eshtiz

    New chat

    Got this now; WARNING: loading script failed: chat-system/s_chat_system.lua:1084 ' Syntax shows but no chat.
  5. Eshtiz

    New chat

    I'm trying to add a new chat, /i /info /ichat This is what I got so far: function infochat(thePlayer, commandName, ...) if ( exports.global:isPlayerBronzeDonator(thePlayer) or exports.global:isPlayerAdmin(thePlayer) ) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local message = table.concat({...}, " ") local title = "" local hidden = getElementData(thePlayer, "hiddenadmin") or 0 if ( exports.global:isPlayerAdmin(thePlayer) ) then if (hidden == 1) or (exports.global:getPlayerAdminTitle(thePlayer) == "Player") then if not (exports.global:isPlayerBronzeDonator(thePlayer)) then title = "Bronze Donator" else title = exports.global:getPlayerDonatorTitle(thePlayer) end else title = exports.global:getPlayerAdminTitle(thePlayer) end elseif ( exports.global:isPlayerBronzeDonator(thePlayer) ) then title = exports.global:getPlayerDonatorTitle(thePlayer) end for key, value in ipairs(getElementsByType("player")) do if ( exports.global:isPlayerBronzeDonator(value) or exports.global:isPlayerAdmin(value) ) then if ( getElementData(value, "infochat") == 1 ) then outputChatBox("[Donator] " .. title .. " " .. getPlayerName(thePlayer) .. ": " .. message, value, 160, 164, 104) end end end end end end addCommandHandler("i", infochat, false, false) addCommandHandler("info", infochat, false, false) addCommandHandler("ichat", infochat, false, false) There is no error messages but it doesn't work.
  6. Eshtiz

    FixAllVehs

    Still doesn't work, no error messages, nothing, all I can give ya is this IC chat for now lol. (( Your engine is off. Press 'J' to turn it on. )) *. attempts to start the engine but fails. The engine is broken.
  7. Eshtiz

    FixAllVehs

    There's a slight problem with this small script After a global vehicle respawn & global vehicle repair they bug, engine breaks down and you cannot start the engine without an admin using /fixveh [id] on you, I've tried most things but I can't get it to work. here's the /fixvehs script: function fixAllVehicles(thePlayer, commandName) if (exports.global:isPlayerAdmin(thePlayer)) then local username = getPlayerName(thePlayer) for key, value in ipairs(exports.pool:getPoolElementsByType("vehicle")) do fixVehicle(value) if (not getElementData(value, "Impounded")) then exports['anticheat-system']:changeProtectedElementDataEx(value, "enginebroke", 0, false) if armoredCars[ getElementModel( value ) ] then setVehicleDamageProof(value, true) else setVehicleDamageProof(value, false) end end end outputChatBox("All vehicles repaired by Admin " .. username .. ".") end end addCommandHandler("fixvehs", fixAllVehicles) here's the specific vehicle repair by ID/name, might help to fix the /fixvehs function fixPlayerVehicle(thePlayer, commandName, target) if (exports.global:isPlayerAdmin(thePlayer)) then if not (target) then outputChatBox("SYNTAX: /" .. commandName .. " [Partial Player Nick]", thePlayer, 255, 194, 14) else local username = getPlayerName(thePlayer) local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target) if targetPlayer then local logged = getElementData(targetPlayer, "loggedin") if (logged==0) then outputChatBox("Player is not logged in.", thePlayer, 255, 0, 0) else local veh = getPedOccupiedVehicle(targetPlayer) if (veh) then fixVehicle(veh) if (getElementData(veh, "Impounded") == 0) then exports['anticheat-system']:changeProtectedElementDataEx(veh, "enginebroke", 0, false) if armoredCars[ getElementModel( veh ) ] then setVehicleDamageProof(veh, true) else setVehicleDamageProof(veh, false) end end outputChatBox("You repaired " .. targetPlayerName .. "'s vehicle.", thePlayer) outputChatBox("Your vehicle was repaired by admin " .. username .. ".", targetPlayer) else outputChatBox("That player is not in a vehicle.", thePlayer, 255, 0, 0) end end end end end end addCommandHandler("fixveh", fixPlayerVehicle, false, false) EDIT: added wrong script (fuel), changed it to repair. EDIT: I figured out the real problem, it's in /fixvehs, it only repairs the vehicle's appearance but doesn't repair the engine so it's not possible to start it.
  8. Thanks, everything works now, I won't be needed anything else regarding this anymore, I'm truly grateful.
  9. Oh, haha okay. I want to feel like a burden nor a tool but my topic got outdated and I can't double post feel free to check it >.> viewtopic.php?f=91&t=39915&start=30
  10. Aww, too bad ;s, is there any way to put shadow behind the text like in the chatbox on other texts then?
  11. That one works well, but isn't it the same as the old one? (if it is, I guess I got an old one while you edited previous posts) >,< How do I edit the font style for it and any fonts for similar texts? can you link me something?
  12. Ah, I see, well I have this givemoney script/command directed for an(specific) ID/player. If it helps, function giveMoney(thePlayer, commandName, target, money) if (exports.global:isPlayerLeadAdmin(thePlayer)) then if not (target) then outputChatBox("SYNTAX: /" .. commandName .. " [Partial Player Nick] [Money]", thePlayer, 255, 194, 14) else local username = getPlayerName(thePlayer) local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target) if targetPlayer then local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) exports.logs:logMessage("[GIVE] " .. getPlayerName(thePlayer):gsub("_", " ") .. " gave " .. targetPlayerName .. " to $" .. money, 23) exports.global:sendMessageToAdmins("AdmCmd: " .. getPlayerName(thePlayer) .. " gave " .. targetPlayerName .. " " .. money .. " dollars.") exports.global:giveMoney(targetPlayer, money) outputChatBox("You have given " .. targetPlayerName .. " $" .. money .. ".", thePlayer) outputChatBox("Admin " .. username .. " has given you $" .. money .. ".", targetPlayer) outputChatBox(" " .. tostring(adminTitle) .. " " .. getPlayerName(thePlayer) .. " gave " .. targetPlayerName .. " " .. money .. " dollars.", getRootElement(), 255, 0, 51) end end end end addCommandHandler("givemoney", giveMoney, false, false) if not I'll try myself again people have been giving a lot of suggestions etc, nothing worked yet. anyways, there it is, might help to complete the giveallmoney script.
  13. Yeh, I'm back to page one. Only shows the syntax and doesn't hand out any money ;/ and yeh, I'm using it ServerSide & I have similar scripts to this one ServerSided, why wouldn't it work on ServerSide?
  14. Doesn't work, no syntax, no command, no money ;S Error message: ERROR: admin-system/Player/s_player_commands.lua:1791: attempt to concaenate local 'money'(a nil value)
  15. Script doesn't work, gives us an error message that we cannot add them, I don't know why though, really need help, there's no vehicle entrances without it, it doesn't add the elevator. here's the script, anyone got any ideas? http://pastebin.com/8bpN9eFj
  16. I am, but as Solidsnake said, I forgot the command handler, stupid of me, sorry for wasting time. but I got something else , I'm trying to make the /givemoney command "globaly" remove the ID and give everyone online an amount of money. this is what I got so far: function giveAllMoney(thePlayer, commandName, money) if (exports.global:isPlayerLeadAdmin(thePlayer)) then if not (target) then outputChatBox("SYNTAX: /" .. commandName .. " [Money]", thePlayer, 255, 194, 14) else local username = getPlayerName(thePlayer) if targetPlayer then local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) exports.logs:logMessage("[GIVE] " .. getPlayerName(thePlayer):gsub("_", " ") .. " gave " .. targetPlayerName .. " to $" .. money, 23) exports.global:sendMessageToAdmins("AdmCmd: " .. getPlayerName(thePlayer) .. " gave all players online " .. money .. " dollars.") outputChatBox("You have given $" .. money .. " to all players ", thePlayer) outputChatBox("Admin " .. username .. " has given you $" .. money .. ".", targetPlayer) outputChatBox(" " .. tostring(adminTitle) .. " " .. getPlayerName(thePlayer) .. " gave all players online " .. money .. " dollars.", getRootElement(), 255, 0, 51) end end end end addCommandHandler("giveallmoney", giveAllMoney, false, false) Only syntax shows but doesn't give money to anyone when it's supposed to give ALL online players.
  17. The whole script, it doesn't take money, no syntax, nothing.
  18. I've been trying to make a command that takes money from a specific player ID/name here's what I got so far (I've checked wiki, didn't work well): function takeMoney(thePlayer, commandName, target, money) if (exports.global:isPlayerLeadAdmin(thePlayer)) then if not (target) then outputChatBox("SYNTAX: /" .. commandName .. " [Partial Player Nick] [Money]", thePlayer, 255, 194, 14) else local username = getPlayerName(thePlayer) local targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, target) if targetPlayer then local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) exports.logs:logMessage("[GIVE] " .. getPlayerName(thePlayer):gsub("_", " ") .. " gave " .. targetPlayerName .. " to $" .. money, 23) exports.global:sendMessageToAdmins("AdmCmd: " .. getPlayerName(thePlayer) .. " gave " .. targetPlayerName .. " " .. money .. " dollars.") exports.global:takeMoney(targetPlayer, money) outputChatBox("Random text " .. targetPlayerName .. " $" .. money .. ".", thePlayer) outputChatBox("Admin " .. username .. " has taken $" .. money .. ".", targetPlayer) outputChatBox(" " .. tostring(adminTitle) .. " " .. getPlayerName(thePlayer) .. " took " .. targetPlayerName .. " " .. money .. " dollars.", getRootElement(), 255, 0, 51) end end end end I reversed it from a 'givemoney' script/command and hoped for it to work, but doesn't, any suggestionss on how to? I checked this: https://wiki.multitheftauto.com/wiki/TakePlayerMoney didn't really work either.
  19. Thanks, but didn't work until I changed this line: elseif (adminLevel >= 4 and adminLevel < 1337) then It's all thanks to you though, it's all good now, solved I got a request from a member earlier today, he wanted [Donator] tags in GOOC, I can't get it to work, the GOOC script is getting big & messy and I get confused, as we have a /don(ator) chat, I've used some lines from there, here's the whole function, I just want all members with a donator level to have [Donator] tag in GOOC. function donatorchat(thePlayer, commandName, ...) if ( exports.global:isPlayerBronzeDonator(thePlayer) or exports.global:isPlayerAdmin(thePlayer) ) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local message = table.concat({...}, " ") local title = "" local hidden = getElementData(thePlayer, "hiddenadmin") or 0 if ( exports.global:isPlayerAdmin(thePlayer) ) then if (hidden == 1) or (exports.global:getPlayerAdminTitle(thePlayer) == "Player") then if not (exports.global:isPlayerBronzeDonator(thePlayer)) then title = "Bronze Donator" else title = exports.global:getPlayerDonatorTitle(thePlayer) end else title = exports.global:getPlayerAdminTitle(thePlayer) end elseif ( exports.global:isPlayerBronzeDonator(thePlayer) ) then title = exports.global:getPlayerDonatorTitle(thePlayer) end for key, value in ipairs(getElementsByType("player")) do if ( exports.global:isPlayerBronzeDonator(value) or exports.global:isPlayerAdmin(value) ) then if ( getElementData(value, "donatorchat") == 1 ) then outputChatBox("[Donator] " .. title .. " " .. getPlayerName(thePlayer) .. ": " .. message, value, 160, 164, 104) end end end end end end addCommandHandler("donator", donatorchat, false, false) addCommandHandler("don", donatorchat, false, false) addCommandHandler("dchat", donatorchat, false, false)
  20. Question, is there a way to seperate admin lvl 1-3 colors, with 4+ (4-1337) Need like green admintag for 1-3 & red for 4+ (4-1337)
  21. Thanks, really. You saved my day! this is pretty much solved
  22. YEh, when they are on hidden admin duty, /hideadmin I want their admintag to disappear in GOOC, is that possible somehow?
  23. Exactly like that, thank you so much. But I just discovered another problem ;S As there's hidden player admins, /hideadmin, it shows (hidden) in the chat. I've tried to move around and use lines from this script: local hiddenAdmin = getElementData(thePlayer, "hiddenadmin") if (hiddenAdmin==0) then local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) exports.global:sendMessageToAdmins(" " .. tostring(adminTitle) .. " " .. getPlayerName(thePlayer) .. " slapped " .. targetPlayerName .. ".") outputChatBox(" " .. tostring(adminTitle) .. " " .. getPlayerName(thePlayer) .. " slapped " .. targetPlayerName .. ".", getRootElement(), 255, 0, 51) exports.logs:logMessage("[/slap] " .. getElementData(thePlayer, "gameaccountusername") .. "/".. getPlayerName(thePlayer) .." slapped ".. targetPlayerName , 4) triggerEvent("removeTintName", targetPlayer) To the GOOC script but I can't hide the hidden admin in GOOC.
  24. Works perfectly, thanks! but as I said in the comment above, I need to disable the tag for regular players, admin level 0, anyone have any idea how to do that?
  25. To the admintag, here: outputChatBox("(( [GOOC] [" .. tostring(adminTitle) .. "] (" .. playerID .. ") " .. playerName .. ": " .. message .. " ))", arrayPlayer, 255, 255, 204) this part: [" .. tostring(adminTitle) .. "] I want to be a specific color a part from the chat text.
×
×
  • Create New...