Raised This Month: $51 Target: $400
 12% 

Solved [CS:GO] GetRandomInt not working properly?


Post New Thread Reply   
 
Thread Tools Display Modes
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-20-2018 , 13:36   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #11

Seems like you send me wrong .sp
Indarello is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 12-20-2018 , 13:39   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #12

Quote:
Originally Posted by Indarello View Post
Seems like you send me wrong .sp
Yeah you're right, sorry for that.
Attached Files
File Type: sp Get Plugin or Get Source (levelsranks_fakerank.sp - 57 views - 5.3 KB)
manicogaming is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-20-2018 , 14:18   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #13

maybe
SetEntDataArray(iEnt, ...., MAXPLAYERS+1, _, true);
Or bots can't have different coin
I can't find mistake
I also checked this code
https://github.com/rogeraabbccdd/Fak...frank-basic.sp
And I realy dont understand "tempCoin"
But maybe you will understand
Code:
if (GetConVarBool(g_ShowCoins))
	{
		int tempCoin[MAXPLAYERS+1];
		GetEntDataArray(iEnt, Offset[2], tempCoin, MAXPLAYERS+1);
		for (int i = 1; i <= MaxClients; i++)
		{
			if (g_bIsCoin[i])
			{
				tempCoin[i] = g_iCoin[i];
			}
		}
		SetEntDataArray(iEnt, Offset[2], tempCoin, MAXPLAYERS+1, _, true);
	} 
	else 
	{
		SetEntDataArray(iEnt, Offset[2], g_iCoin, MAXPLAYERS+1, _, true);
	}

Last edited by Indarello; 12-20-2018 at 14:23.
Indarello is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 12-20-2018 , 15:03   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #14

Quote:
Originally Posted by Indarello View Post
maybe
SetEntDataArray(iEnt, ...., MAXPLAYERS+1, _, true);
Or bots can't have different coin
I can't find mistake
I also checked this code
https://github.com/rogeraabbccdd/Fak...frank-basic.sp
And I realy dont understand "tempCoin"
But maybe you will understand
Code:
if (GetConVarBool(g_ShowCoins))
	{
		int tempCoin[MAXPLAYERS+1];
		GetEntDataArray(iEnt, Offset[2], tempCoin, MAXPLAYERS+1);
		for (int i = 1; i <= MaxClients; i++)
		{
			if (g_bIsCoin[i])
			{
				tempCoin[i] = g_iCoin[i];
			}
		}
		SetEntDataArray(iEnt, Offset[2], tempCoin, MAXPLAYERS+1, _, true);
	} 
	else 
	{
		SetEntDataArray(iEnt, Offset[2], g_iCoin, MAXPLAYERS+1, _, true);
	}
I also tried with the SetEntDataArray(iEnt, ...., MAXPLAYERS+1, _, true); and got the same result.
And the tempCoin thing I think it is used for a cvar which that plugin has that when enabled displays the real coin of the player and when disabled displays a fake coin.
manicogaming is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-21-2018 , 00:58   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #15

Bots copy coin from the first bot in
for (int i = 1; ... i++)
Attached Files
File Type: sp Get Plugin or Get Source (levelsranks_fakerank.sp - 91 views - 914 Bytes)

Last edited by Indarello; 12-21-2018 at 01:20.
Indarello is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 12-21-2018 , 10:59   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #16

Quote:
Originally Posted by Indarello View Post
Bots copy coin from the first bot in
for (int i = 1; ... i++)
Sadly that still gives all bots the same coin but because there is a timer the bots are always changing the coin but all of them still get the same one.
manicogaming is offline
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 12-21-2018 , 12:32   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #17

can you give him another value manually?

it could be the case that bot cannot treat those values..
__________________
Starbish is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 12-21-2018 , 13:43   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #18

Quote:
Originally Posted by Starbish View Post
can you give him another value manually?

it could be the case that bot cannot treat those values..
Not even with manual values.
manicogaming is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-21-2018 , 15:41   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #19

Quote:
Originally Posted by manicogmaing View Post
Not even with manual values.
Literally said that more than a day ago that coins are specific per account/steamid, making bots only able to have 1.
Mitchell is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 12-21-2018 , 16:38   Re: [CS:GO] GetRandomInt not working properly?
Reply With Quote #20

Quote:
Originally Posted by Mitchell View Post
Literally said that more than a day ago that coins are specific per account/steamid, making bots only able to have 1.
Yeah, you're right, sorry. How about stickers, can they be applied on the skins that bots have?
manicogaming is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode