Jump to content

simple easy problem


Recommended Posts

server side

addEvent("SendTexetes", true) 
function SendTexetes (Player, thetext) 
    local name = getPlayerName(Player) 
    outputChatBox("* [support]  "..name..": #00FFF7"..thetext, getRootElement(),255,0,0,true) 
    if isPlayerMuted (source) then 
    thetext = false -- is that works ? .. 
    outputChatBox("you can't speak here when you muted", getRootElement(),255,0,0,true) 
end 
end 
addEventHandler("SendTexetes", getRootElement(), SendTexetes) 

i want when the player muted then the player can't send messages on gui-edit

client side

function furbo(state) 
    if state == "left" then 
       if ( source == GUIEditor_Button[1] ) then 
           local Player = getLocalPlayer() 
           local thetext = guiGetText(GUIEditor_Edit[1]) 
           if thetext ~= "" then 
           triggerServerEvent("SendTexetes", getLocalPlayer(), Player, thetext) 
           guiSetText(GUIEditor_Edit[1], "") 
           else 
           outputChatBox("cannot send the message", 255, 255, 0 ) 
             
                end 
            end 
        end 
    end 
addEventHandler("onClientGUIClick", getRootElement(), furbo) 

Link to comment
function SendTexetes (Player, thetext) 
    local name = getPlayerName(Player) 
    if not isPlayerMuted (Player) then 
        outputChatBox("* [support]  "..name..": #00FFF7"..thetext, getRootElement(),255,0,0,true) 
    else 
        outputChatBox("you can't speak here when you muted", Player,255,0,0,true) 
    end 
end 
addEvent("SendTexetes", true) 
addEventHandler("SendTexetes", getRootElement(), SendTexetes) 

Link to comment
function SendTexetes (Player, thetext) 
    local name = getPlayerName(Player) 
    if not isPlayerMuted (Player) then 
        outputChatBox("* [support]  "..name..": #00FFF7"..thetext, getRootElement(),255,0,0,true) 
    else 
        outputChatBox("you can't speak here when you muted", Player,255,0,0,true) 
    end 
end 
addEvent("SendTexetes", true) 
addEventHandler("SendTexetes", getRootElement(), SendTexetes) 

wow thanks .. how smarter are you :D

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...