Jump to content

problem with the button


Recommended Posts

 

please, can someone explain to me how to create these buttons.
When I press "C(99)" it gives disconnect

 

 

local function pizdak(target, pos, player)
  if player.prefab == "esctemplate"  then
        for i, player in ipairs(AllPlayers) do
            if not (player.prefab == "koishi") then
                SpawnPrefab("sanity_lower").Transform:SetPosition(player.Transform:GetWorldPosition())
                player.components.sanity:DoDelta(-50)
                SpawnPrefab("nightmarefuel").Transform:SetPosition(player.Transform:GetWorldPosition())
            end
        end
    end
end


AddModRPCHandler("GrowGiantRPC", "pizdak", pizdak)

GLOBAL.TheInput:AddKeyDownHandler(99,function() 
    
    SendModRPCToServer(MOD_RPC["GrowGiantRPC"]["pizdak"])
end)

end)

 

if you want to take a look at the whole code, then here

modmain.lua

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...