Help Sup - Lua Help thing

DonOrlando

Member
Joined
May 20, 2018
Messages
15
Reaction score
0
I would like to add Auto stop response when some rpcs happens, when i get this RPC the Script Automaticly stopping because some servers are using this method to see if ur here or not, apply on Player Move, Cars, Boats, Bikes and ALL kind of PLANES, here's the rpc and the script link


Rpcs:
TogglePlayerControllable - ID: 15
SetPlayerPos - ID: 12
PlaySound - ID: 16

the wanted script to be edited -

 

fsociety

Active member
Joined
Dec 6, 2016
Messages
81
Reaction score
5
I would like to add Auto stop response when some rpcs happens, when i get this RPC the Script Automaticly stopping because some servers are using this method to see if ur here or not, apply on Player Move, Cars, Boats, Bikes and ALL kind of PLANES, here's the rpc and the script link


Rpcs:
TogglePlayerControllable - ID: 15
SetPlayerPos - ID: 12
PlaySound - ID: 16

the wanted script to be edited -


JavaScript:
--[[https://github.com/Brunoo16/samp-packet-list/wiki/RPC-List]]
-- TogglePlayerControllable - ID: 15
-- SetPlayerPos - ID: 12
-- PlaySound - ID: 16
local ids = {15, 12, 16}
function onReceiveRpc(id, bs)
    for i, blockedId in ipairs(ids) do
        if id == blockedId then
            -- your logic here
        end
    end
end

I think it goes something like this
 

fsociety

Active member
Joined
Dec 6, 2016
Messages
81
Reaction score
5
JavaScript:
--[[https://github.com/Brunoo16/samp-packet-list/wiki/RPC-List]]
-- TogglePlayerControllable - ID: 15
-- SetPlayerPos - ID: 12
-- PlaySound - ID: 16
local ids = {15, 12, 16}
function onReceiveRpc(id, bs)
    for i, blockedId in ipairs(ids) do
        if id == blockedId then
            -- your logic here
        end
    end
end

I think it goes something like this

Either return false to block those rpcs or insert your logic there
 
Top