Tete omar Posted June 16, 2012 Posted June 16, 2012 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)
TwiX! Posted June 16, 2012 Posted June 16, 2012 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)
Tete omar Posted June 16, 2012 Author Posted June 16, 2012 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
Stanley Sathler Posted June 16, 2012 Posted June 16, 2012 This code was made by you, Teteomar? If yes, congratulations, seems you're learning Lua now. (:
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now