Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Player list feature not working

Vac88 | Overdose.it v2 coder
Забаненный
Забаненный
Статус
Оффлайн
Регистрация
1 Янв 2021
Сообщения
28
Реакции
5
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
so my friend is making his own legit/movement/semirage/rage (rage maybe) and he was working on a vote kick for his player list but it won't work.

C++:
Expand Collapse Copy
if (ImGui::Button("Vote Kick"))
{
      std::string cmd;
       //                                                userid
       cmd.reserve((sizeof("callvote kick ") / sizeof("")) + 3);
       cmd.append("callvote kick ");
       cmd.append(std::to_string(entityInformation.userId));
       g_EngineClient->ExecuteClientCmd(cmd.c_str());
}

he tried swapping ClientCmd_Unrestricted instead of ExecuteClientCmd but that crashes. as far as he knows its sending the callvote kick command just not the userid.

Any help? Thanks in advance.
 
Well, firstly std::string is very good written dynamic array, you don't have to use reserve and append for string you will never use again. So u can (and also u really should) use
C++:
Expand Collapse Copy
g_EngineClient->ExecuteClientCmd(("callvote kick " + std::to_string(entityInformation.userId)).c_str());
instead of that 5 lines of code u wrote... Those r ugly as fuck.

Also check if callvote kick $id still works, just type it in console by ur hands
 
Назад
Сверху Снизу