Lua Samp client commands input

RnR

Новичок
Автор темы
10
0
Версия SA-MP
  1. Любая
Hello,

I was looking for help on making commands like /fpslimit, /pagesize, /dl, and so on (the samp client commands), enterable in a lua script. I tried registering them as a samp command, but the game doesn't recognize it because its a client command. How can I make the /fpslimit command register in a lua script? I'm not looking for an fps cleo, I want the actual client commands to work in my script so I can use all the other ones too.

Thanks
 

RnR

Новичок
Автор темы
10
0
Try this
Lua:
local sampev = require 'lib.samp.events'
function sampev.onSendCommand(command)
  if command == "/cmd" then
    return false
  end
end
or
Lua:
sampUnregisterChatCommand("/cmd")

I am looking for how to set the fps limit to a specific amount so I can use /fpslimit 90 and I get 90fps

Thanks
 

_razor

t.me/sssecretway | ТГК: t.me/razor_code
Всефорумный модератор
1,936
3,166
Use function addresses:

C++:
void Commands::TestDeathWindow(const char* params) {
    CMDPROC(GetAddress(0x64930))
    (params);
}

void Commands::ToggleCameraTargetLabels(const char* params) {
    CMDPROC(GetAddress(0x64A10))
    (params);
}

void Commands::SetChatPageSize(const char* params) {
    CMDPROC(GetAddress(0x64A20))
    (params);
}

void Commands::SetChatFontSize(const char* params) {
    CMDPROC(GetAddress(0x64AA0))
    (params);
}

void Commands::DrawNameTagStatus(const char* params) {
    CMDPROC(GetAddress(0x65B50))
    (params);
}

void Commands::DrawChatTimestamps(const char* params) {
    CMDPROC(GetAddress(0x64B60))
    (params);
}

void Commands::ToggleAudioStreamMessages(const char* params) {
    CMDPROC(GetAddress(0x64BC0))
    (params);
}

void Commands::PrintMemory(const char* params) {
    CMDPROC(GetAddress(0x64C40))
    (params);
}

void Commands::SetFrameLimiter(const char* params) {
    CMDPROC(GetAddress(0x64C60))
    (params);
}

void Commands::ToggleHeadMoves(const char* params) {
    CMDPROC(GetAddress(0x64CF0))
    (params);
}

void Commands::Quit(const char* params) {
    CMDPROC(GetAddress(0x64D70))
    (params);
}

void Commands::CmpStat(const char* params) {
    CMDPROC(GetAddress(0x64D80))
    (params);
}

void Commands::SavePosition(const char* params) {
    CMDPROC(GetAddress(0x64D90))
    (params);
}

void Commands::SavePositionOnly(const char* params) {
    CMDPROC(GetAddress(0x64F10))
    (params);
}

void Commands::PrintCurrentInterior(const char* params) {
    CMDPROC(GetAddress(0x65360))
    (params);
}

void Commands::ToggleObjectsLight(const char* params) {
    CMDPROC(GetAddress(0x65390))
    (params);
}

void Commands::ToggleDebugLabels(const char* params) {
    CMDPROC(GetAddress(0x653B0))
    (params);
}

void Commands::SendRconCommand(const char* params) {
    CMDPROC(GetAddress(0x653C0))
    (params);
}

void Commands::Debug::SetPlayerSkin(const char* params) {
    CMDPROC(GetAddress(0x65090))
    (params);
}

void Commands::Debug::CreateVehicle(const char* params) {
    CMDPROC(GetAddress(0x65100))
    (params);
}

void Commands::Debug::EnableVehicleSelection(const char* params) {
    CMDPROC(GetAddress(0x65240))
    (params);
}

void Commands::Debug::SetWorldWeather(const char* params) {
    CMDPROC(GetAddress(0x65260))
    (params);
}

void Commands::Debug::SetWorldTime(const char* params) {
    CMDPROC(GetAddress(0x652B0))
    (params);
}

void Commands::Setup() {
    ((void(__cdecl*)())GetAddress(0x654A0))();
}

(Addresses are taken from the SAMP API)
 
  • Нравится
Реакции: RnR

_razor

t.me/sssecretway | ТГК: t.me/razor_code
Всефорумный модератор
1,936
3,166