Welcome, Guest.

Author Topic: Command number ?  (Read 85 times)

Offline asdqwe1548

  • Level 1 - Noob
  • *
  • Posts: 11
    • View Profile
  • Korea, Republic of
Command number ?
« on: September 19, 2018, 10:20:01 am »
int Predict(lua_State* state)
{

LUA->CheckType(1, Type::USERCMD);
auto user_data = (GarrysMod::Lua::UserData*)LUA->GetUserdata(1);
auto pCmd = (CUserCmd*)user_data->data;

pCmd->m_cmd_nr = 142;
pCmd->m_random_seed = MD5_PseudoRandom(142) & 0x7FFFFFFF;

return 1;
}
i tried this function in gmod and it froze me so i made pCmd->m_random_seed = bla bla into a comment and it still froze me i made cmd number a comment and made random seed not a comment everything worked fine

idk why this shet aint working i tried making a keybind and freeze in the air to see if its an airstuck it wasnt lul anyways any answers?

Online KittoniuM

  • Administrator
  • Level 8 - Tru Packet
  • *
  • Posts: 1181
    • View Profile
  • Canada
Re: Command number ?
« Reply #1 on: September 19, 2018, 10:36:26 am »
int Predict(lua_State* state)
{

LUA->CheckType(1, Type::USERCMD);
auto user_data = (GarrysMod::Lua::UserData*)LUA->GetUserdata(1);
auto pCmd = (CUserCmd*)user_data->data;

pCmd->m_cmd_nr = 142;
pCmd->m_random_seed = MD5_PseudoRandom(142) & 0x7FFFFFFF;

return 1;
}
i tried this function in gmod and it froze me so i made pCmd->m_random_seed = bla bla into a comment and it still froze me i made cmd number a comment and made random seed not a comment everything worked fine

idk why this shet aint working i tried making a keybind and freeze in the air to see if its an airstuck it wasnt lul anyways any answers?

WTF? why are u getting cusercmd from lua?
where are youcalling this from?




Total Members


  • Youtube Youtube
  • Facebook Facebook
  • Twitter Twitter
  • Steam Steam

  • Powered by SMF | SMF © 2018, Simple Machines

    2018 BigPackets. All rights reserved. All other trademarks, logos and copyrights are the property of their respective owners. This site is not associated with any company in any way.