Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error with GetConvar #332

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions fivem_script/tokovoip_script/src/c_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ RegisterNUICallback("setPlayerTalking", function(data, cb)

if (voip.talking == 1) then
setPlayerData(voip.serverId, "voip:talking", 1, true);
if (GetConvar("gametype") == "gta5") then
if (GetConvar("gametype", "gta5") == "gta5") then
PlayFacialAnim(GetPlayerPed(PlayerId()), "mic_chatter", "mp_facial");
elseif (GetConvar("gametype") == "rdr3") then
elseif (GetConvar("gametype", "rdr3") == "rdr3") then
PlayRedMFacialAnimation(GetPlayerPed(PlayerId()), "face_human@gen_male@base", "mood_talking_normal");
end
else
setPlayerData(voip.serverId, "voip:talking", 0, true);
if (GetConvar("gametype") == "gta5") then
if (GetConvar("gametype", "gta5") == "gta5") then
PlayFacialAnim(PlayerPedId(), "mood_normal_1", "facials@gen_male@base");
elseif (GetConvar("gametype") == "rdr3") then
elseif (GetConvar("gametype", "rdr3") == "rdr3") then
PlayRedMFacialAnimation(PlayerPedId(), "face_human@gen_male@base", "mood_normal");
end
end
Expand Down Expand Up @@ -105,7 +105,7 @@ local function clientProcessing()

local playerTalking = getPlayerData(playerServerId, "voip:talking");

if (GetConvar("gametype") == "gta5") then
if (GetConvar("gametype", "gta5") == "gta5") then
setPlayerTalkingState(player, playerServerId);
end

Expand Down Expand Up @@ -237,10 +237,10 @@ AddEventHandler("initializeVoip", function()
targetPed = GetPlayerPed(-1);

-- Request this stuff here only one time
if (GetConvar("gametype") == "gta5") then
if (GetConvar("gametype", "gta5") == "gta5") then
RequestAnimDict("mp_facial");
RequestAnimDict("facials@gen_male@base");
elseif (GetConvar("gametype") == "rdr3") then
elseif (GetConvar("gametype", "rdr3") == "rdr3") then
RequestAnimDict("face_human@gen_male@base");
end

Expand Down
2 changes: 1 addition & 1 deletion fivem_script/tokovoip_script/src/s_main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
local channels = TokoVoipConfig.channels;
local serverId;

SetConvarReplicated("gametype", GetConvar("GameName"));
SetConvarReplicated("gametype", GetConvar("GameName", "gta5"));

function addPlayerToRadio(channelId, playerServerId, radio)
if (not channels[channelId]) then
Expand Down