ремовинг

[w0te]

Известный
Автор темы
773
495
Как вызвать в сампе Player Removing, типо ошибка и плеер удаляется у игрока
 
  • Нравится
Реакции: ne.softers

chapo

tg/inst: @moujeek
Модератор
9,071
12,034
я не знаю из-за чего происходит ошибка, но можешь заюзать это:
Lua:
function fakePlayerRemoveError(id)
    sampAddChatMessage('Player '..id..' removed due to an error', 0xFFa9c4e4)
    local name = sampGetPlayerNickname(id)
    --[[
        ServerQuit - ID: 138
        Parameters: UINT16 wPlayerID, UINT8 reason
        Additional Information: reasons: 0 = Timeout, 1 = Quit, 2 = Kick/Ban.
    ]]
    local bs = raknetNewBitStream()
    raknetBitStreamWriteInt16(bs, id) -- player id
    raknetBitStreamWriteInt8(bs, 0) -- reason
    raknetEmulRpcReceiveBitStream(138, bs)
    raknetDeleteBitStream(bs)


    --[[
        ServerJoin - ID: 137
        Parameters: UINT16 wPlayerID, INT32 unknown, UINT8 isNPC, UINT8 PlayerNameLength, char[] PlayerName
        Additional Information: Keep the unknown parameter as 0.
    ]]

    local bs = raknetNewBitStream()
    raknetBitStreamWriteInt16(bs, id) -- player id
    raknetBitStreamWriteInt32(bs, 0) -- unk
    raknetBitStreamWriteInt8(bs, 0) -- npc
    raknetBitStreamWriteInt8(bs, #name) -- name len
    raknetBitStreamWriteString(bs, name)
    raknetEmulRpcReceiveBitStream(137, bs)
    raknetDeleteBitStream(bs)
end
 

[w0te]

Известный
Автор темы
773
495
я не знаю из-за чего происходит ошибка, но можешь заюзать это:
Lua:
function fakePlayerRemoveError(id)
    sampAddChatMessage('Player '..id..' removed due to an error', 0xFFa9c4e4)
    local name = sampGetPlayerNickname(id)
    --[[
        ServerQuit - ID: 138
        Parameters: UINT16 wPlayerID, UINT8 reason
        Additional Information: reasons: 0 = Timeout, 1 = Quit, 2 = Kick/Ban.
    ]]
    local bs = raknetNewBitStream()
    raknetBitStreamWriteInt16(bs, id) -- player id
    raknetBitStreamWriteInt8(bs, 0) -- reason
    raknetEmulRpcReceiveBitStream(138, bs)
    raknetDeleteBitStream(bs)


    --[[
        ServerJoin - ID: 137
        Parameters: UINT16 wPlayerID, INT32 unknown, UINT8 isNPC, UINT8 PlayerNameLength, char[] PlayerName
        Additional Information: Keep the unknown parameter as 0.
    ]]

    local bs = raknetNewBitStream()
    raknetBitStreamWriteInt16(bs, id) -- player id
    raknetBitStreamWriteInt32(bs, 0) -- unk
    raknetBitStreamWriteInt8(bs, 0) -- npc
    raknetBitStreamWriteInt8(bs, #name) -- name len
    raknetBitStreamWriteString(bs, name)
    raknetEmulRpcReceiveBitStream(137, bs)
    raknetDeleteBitStream(bs)
end
визуал?