- Initiateur de la discussion
BCZ Gaming
Psychopathe
- Messages
- 1 301
- Score réaction
- 129
- Points
- 275
Bonjour je voudrais que la case s'affiche de l'autre coté es ce que sais possible?
Merci d'avance !
Code:
local VideoAccess = { ["superadmin"] = true, ["admin"] = true, ["administrateur"] = true, ["super-modo"] = true, ["modo"] = true, ["modo-test"] = true,
}
if SERVER then local Videaste = {} util.AddNetworkString("Video:EditTable") hook.Add("PlayerSay", "Video:OnSay", function(ply, plyText) if string.lower(plyText) == "!stop" then local CTime = CurTime() ply.VideoAntiSpamTime = ply.VideoAntiSpamTime || 0 if CTime < ply.VideoAntiSpamTime then ply:ChatPrint("Merci de ne pas spam la commande !") return end ply.VideoAntiSpamTime = CTime + 30 local pSteamID64 = ply:SteamID64() if !Videaste[ pSteamID64 ] then Videaste[ pSteamID64 ] = ply ply:ChatPrint("Vous venez d'entrer dans le mode ne pas déranger.") else Videaste[ pSteamID64 ] = nil ply:ChatPrint("Vous venez de sortir du mode ne pas déranger.") end for key, pPlayer in ipairs( player.GetAll() ) do if VideoAccess[ pPlayer:GetUserGroup() ] then net.Start("Video:EditTable") net.WriteTable( Videaste ) net.Send( pPlayer ) end end return "" end end) hook.Add("PlayerDisconnected","Video:OnDisconnect", function( ply ) local pSteamID64 = ply:SteamID64() if Videaste[ pSteamID64 ] then Videaste[ pSteamID64 ] = nil end end )
else local ScrW, ScrH = ScrW(), ScrH() local wei, hei = ScrW / 1600, ScrH / 900 local Videaste = {} net.Receive( "Video:EditTable", function() Videaste = net.ReadTable() end ) hook.Add("HUDPaint", "Video:Draw", function() if VideoAccess[LocalPlayer():GetUserGroup()] then local nbVideaste = table.Count(Videaste) if nbVideaste >= 1 then surface.SetDrawColor(255, 255, 255, 255) surface.DrawLine( wei * 10, hei * 50, wei * 240, hei * 50) -- ligne blanche surface.SetDrawColor(18, 23, 38, 230) surface.DrawRect( wei * 5, hei * 5, wei * 650, hei * 90 + nbVideaste * 25) draw.SimpleText( "Ne pas déranger sinon kick", "Trebuchet24", wei * 125, hei * 15, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER ) local BaseY = 65 -- espace entre les noms for pSteamID64, target in pairs(Videaste) do if IsValid( target ) then draw.SimpleText( "- " .. target:Nick(), "Trebuchet18", wei * 50, hei * BaseY, Color(255, 255, 255) ) BaseY = BaseY + 25 -- baisser la surface bleu end end end end end )
end