Jump to content

~Air

Members
  • Posts

    62
  • Joined

  • Last visited

About ~Air

  • Birthday 26/09/1998

Details

  • Gang
    ...
  • Location
    Germany
  • Interests
    Scripting

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

~Air's Achievements

Snitch

Snitch (10/54)

0

Reputation

  1. Still doesn't work 4O4
  2. Hey guys, I got again a problem. So a player that hasn't got a chatcolor and writes in the teamchat, the message will be displayed to everyone. Only if a player has got a chatcolor the message will be only shown on the teamchat. Could someone help me please? local function teamChat(message, messageType) if messageType == 2 then cancelEvent() local acc = getPlayerAccount(source) if not isGuestAccount(acc) then if getAccountData(acc,"chatc") and getElementData(source, "Vip") == true then local color = getAccountData(acc,"chatc") local team = getPlayerTeam ( source ) if ( not team ) then return end for _, team in ipairs ( getPlayersInTeam ( team ) ) do outputChatBox("(TEAM): " ..getPlayerName(source)..": "..color..""..message, team, 255, 255, 255, true ) end else outputChatBox("(TEAM): " ..getPlayerName(source)..": #FFFFFF"..message, team, 255, 255, 255, true ) end else outputChatBox("(TEAM): "..getPlayerName(source)..": #FFFFFF"..message, team, 255, 255, 255, true ) end outputServerLog("CHAT: "..getPlayerName(source)..": "..message) end end addEventHandler("onPlayerChat", root, teamChat)
  3. ~Air

    Colorcodes

    Thanks it worked!
  4. ~Air

    Colorcodes

    Yes, it shows like this: #FF4500test instead of: test or #00FF00test instead of: test just for example.
  5. ~Air

    Colorcodes

    It fixxed the errors, but it still doesn't show the colorcoded Status.
  6. ~Air

    Colorcodes

    Still same error.
  7. ~Air

    Colorcodes

    @Dealman: I posted the new error, it isn't the thing with the string anymore. It's the one with expected element at argument 1. BTW: I already tried source instead of player still same error!
  8. ~Air

    Colorcodes

    Sorry for bump. I tried something new: dxDrawText(getPlayerStatus(player), x+522, y-5 + (c - 1) * 20, x + 425+35, y + (c) * 20, tocolor(0,0,0, 255), 1, "default-bold", "center", "center", false, false, true) -- dxDrawText(getPlayerStatus(player), x+522+2, y-5+2 + (c - 1) * 20, x + 425+35, y + (c) * 20, tocolor(255,255,255, 255), 1, "default-bold", "center", "center", false, false, true) function getPlayerStatus (player) local admin = getElementData(player,"Status") if admin then return admin else return "Guest" end end But this is my error: (The line with getAccountData) expected element at argument 1
  9. ~Air

    Colorcodes

    It does get the Status from the player.
  10. ~Air

    Colorcodes

    This has nothing to do with that TAPL, I just need help to get it to show colorcodes.
  11. ~Air

    Colorcodes

    Changed it to this: dxDrawText(getElementData(element[2],"Status"), x+522, y-5 + (c - 1) * 20, x + 425+35, y + (c) * 20, tocolor(0,0,0, 255), 1, "default-bold", "center", "center", false, false, false, true) -- dxDrawText(getElementData(element[2],"Status"), x+522+2, y-5+2 + (c - 1) * 20, x + 425+35, y + (c) * 20, tocolor(255,255,255, 255), 1, "default-bold", "center", "center", false, false, false, true) But now I get an error: Expected string at argument 1
  12. ~Air

    Colorcodes

    Hey guys, I got one problem I made a text on my scoreboard but when I type a Status with colorcode it just shows it with the colorcode in the nametags but not in the scoreboard. I hope you could help me. That is just a part of my script, so that nobody can steal it. dxDrawText(getElementData(element[2],"Status"), x+522, y-5 + (c - 1) * 20, x + 425+35, y + (c) * 20, tocolor(0,0,0, 255), 1, "default-bold", "center", "center") -- dxDrawText(getElementData(element[2],"Status"), x+522+2, y-5+2 + (c - 1) * 20, x + 425+35, y + (c) * 20, tocolor(255,255,255, 255), 1, "default-bold", "center", "center")
×
×
  • Create New...