GTA5改分红插件

编程开发   © 文章版权由 admin 解释,禁止匿名转载

#楼主# 2023-3-7

以下是相关代码但并不完整,求大佬指点代码如下:
1. 获取玩家的资产总值

```cpp
int totalAssets = getPlayerMoney(player);
```

2. 获取玩家当前所在的公司

```cpp
int playerCompanyId = getEntityData(player, "CompanyId");
```

3. 获取公司的总资产和股东列表

```cpp
int companyTotalAssets = getEntityData(company, "TotalAssets");
std::vector shareholders = getEntityData(company, "Shareholders");
```

4. 计算股东分红

```cpp
for (auto shareholder : shareholders)
{
int shares = getEntityData(player, "Shares");
float dividend = (float)companyTotalAssets / shares;
int payout = (int)(dividend * shares);
givePlayerMoney(shareholder, payout);
}
```

求分享,求分享
12楼
WD浅影 2023-3-9
百度就行啊
13楼
WD浅影 2023-3-9
搜gta线上小助手进官网下载
14楼
白给之王 2023-3-9
用ce查gta数据的偏移,再把基址和偏移值填进模块,然后可以绑定一键操作
分享一下源码吧
1 2

评论

登录后才可发表内容
  • 主题

    1

  • 帖子

    7

  • 关注者

    0

TA的新帖
Copyright © 2019 凯特网.   Powered by HYBBS 2.3.4  

Runtime:0.0508s Mem:2100Kb