mirror of
https://github.com/WillMartin03/ulx-custom-commands.git
synced 2025-03-04 03:03:14 -05:00
Add isvalid player check in cc_voting.lua
This commit is contained in:
parent
8aeb36b448
commit
e5dfebfc0a
@ -79,12 +79,12 @@ timer.Create("ulxcc_votingTimer", 60, 0, function ()
|
||||
v:SetPData("votemuted", tonumber(v:GetPData("votemuted")) - 1);
|
||||
end
|
||||
timer.Simple(0, function ()
|
||||
if (v:GetPData("votegagged") == (0 || "0")) then
|
||||
if (IsValid(v) && v:GetPData("votegagged") == (0 || "0")) then
|
||||
v:RemovePData("votegagged");
|
||||
v.cc_voting_votegagged = nil;
|
||||
ULib.tsay(nil, v:Nick() .. " was auto-ungagged.");
|
||||
end
|
||||
if (v:GetPData("votemuted") == (0 || "0")) then
|
||||
if (IsValid(v) && v:GetPData("votemuted") == (0 || "0")) then
|
||||
v:RemovePData("votemuted");
|
||||
ULib.tsay(nil, v:Nick() .. " was auto-unmuted.");
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user