Raised This Month: $32 Target: $400
 8% 

[L4D(2)] MultiSlots


Post New Thread Reply   
 
Thread Tools Display Modes
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 02-04-2019 , 18:47   Re: [L4D(2)] MultiSlots
Reply With Quote #221

Quote:
Originally Posted by Marttt View Post
Are you having this error often? I ran several campaigns on my server with no errors, if it is frequent, it may be the file of the gamedata folder that you are using.

I added the gamedata .txt file in the previous post, see if it is the same and if it solves the problem.

PS: Eu já jogo no seu server as vezes ^^

Thanks my friend. I will try with the gamedata that you posted.

Quando vc estiver no server, e eu tiver tambem me avisa para saber que é vc, caso não use o mesmo nick.
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 02-13-2019 , 08:23   Re: [L4D(2)] MultiSlots
Reply With Quote #222

The plugin is working, but I get an error in the Log file.
I do not know if it is important but I have decided to post for opinions and help is possible.

Version post https://forums.alliedmods.net/showpo...&postcount=218 ( Marttt) - Thanks for this


L 02/12/2019 - 20:00:58: [SM] Exception reported: Property "m_humanSpectatorUserID" not found (entity 10/player)
L 02/12/2019 - 20:00:58: [SM] Blaming: l4d2_multislots.smx
L 02/12/2019 - 20:00:58: [SM] Call stack trace:
L 02/12/2019 - 20:00:58: [SM] [0] GetEntProp
L 02/12/2019 - 20:00:58: [SM] [1] Line 660, /home/groups/sourcemod/upload_tmp/phpCMIIuB.sp::IsClientIdle
L 02/12/2019 - 20:00:58: [SM] [2] Line 122, /home/groups/sourcemod/upload_tmp/phpCMIIuB.sp::JoinTeam
L 02/12/2019 - 20:00:58: [SM] [3] Line 356, /home/groups/sourcemod/upload_tmp/phpCMIIuB.sp::Timer_AutoJoinTeam
L 02/12/2019 - 20:10:19: Error log file session closed.
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie

Last edited by Mi.Cura; 02-13-2019 at 08:23.
Mi.Cura is offline
AK978
Senior Member
Join Date: Jun 2018
Old 02-13-2019 , 09:44   Re: [L4D(2)] MultiSlots
Reply With Quote #223

change maybe ok

bool HasIdlePlayer(int bot)
{
int userid = GetEntData(bot, FindSendPropInfo("SurvivorBot", "m_humanSpectatorUserID"));
int client = GetClientOfUserId(userid);

if(client)
{
if(IsClientInGame(client) && !IsFakeClient(client) && (GetClientTeam(client)==1))
return true;
}
return false;
}

bool IsClientIdle(int client)
{
for(int i = 1; i <= MaxClients; i++)
{
if(!IsClientConnected(i))
continue;
if(!IsClientInGame(i))
continue;
if(GetClientTeam(i)==1)
continue;
if(!IsFakeClient(i))
continue;
if(!HasIdlePlayer(i))
continue;

int spectator_userid = GetEntData(i, FindSendPropInfo("SurvivorBot", "m_humanSpectatorUserID"));
int spectator_client = GetClientOfUserId(spectator_userid);

if(spectator_client == client)
return true;
}
return false;
}

Last edited by AK978; 02-14-2019 at 00:01.
AK978 is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 02-13-2019 , 11:15   Re: [L4D(2)] MultiSlots
Reply With Quote #224

Quote:
Originally Posted by AK978 View Post
change maybe ok

stock bool:HasIdlePlayer(bot)
{
new userid = GetEntData(bot, FindSendPropInfo("SurvivorBot", "m_humanSpectatorUserID"))
new client = GetClientOfUserId(userid)

if(client)
{
// Do not count bots
// Do not count 3rd person view players
if(IsClientInGame(client) && !IsFakeClient(client) && (GetClientTeam(client)!=2))
return true
}
return false
}

stock bool:IsClientIdle(client)
{
for(new i = 1; i <= MaxClients; i++)
{
if(!IsClientConnected(i))
continue
if(!IsClientInGame(i))
continue
if(GetClientTeam(i)!=2)
continue
if(!IsFakeClient(i))
continue
if(!HasIdlePlayer(i))
continue

new spectator_userid = GetEntData(i, FindSendPropInfo("SurvivorBot", "m_humanSpectatorUserID"))
new spectator_client = GetClientOfUserId(spectator_userid)

if(spectator_client == client)
return true
}
return false
}

I know it's asking a lot, but it would be possible to make the changes in the .sp file for me.
I do not think I have enough knowledge for this.

If you can not, no problem, thanks for the help anyway.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_multislots.sp - 470 views - 19.1 KB)
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
AK978
Senior Member
Join Date: Jun 2018
Old 02-13-2019 , 11:54   Re: [L4D(2)] MultiSlots
Reply With Quote #225

you need test
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_multislots.sp - 752 views - 19.2 KB)
AK978 is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 02-14-2019 , 12:05   Re: [L4D(2)] MultiSlots
Reply With Quote #226

Quote:
Originally Posted by AK978 View Post
you need test

I tested yesterday with 10 players and no error was shown in the .log file.

It worked very well. Thank you very much

__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
BloodyBlade
Senior Member
Join Date: Feb 2018
Old 06-05-2019 , 18:56   Re: [L4D(2)] MultiSlots
Reply With Quote #227

Quote:
Originally Posted by AK978 View Post
you need test
Do I still need to use multislots in conjunction with afk fix?
BloodyBlade is offline
AK978
Senior Member
Join Date: Jun 2018
Old 06-05-2019 , 23:18   Re: [L4D(2)] MultiSlots
Reply With Quote #228

I am not an author.
If you have this bug.
AK978 is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 06-06-2019 , 11:08   Re: [L4D(2)] MultiSlots
Reply With Quote #229

I use this without errors.
Attached Files
File Type: smx multislots.smx (11.1 KB, 310 views)
File Type: txt multislots.txt (522 Bytes, 363 views)
File Type: smx fix_l4dafkfix.smx (8.3 KB, 287 views)
File Type: sp Get Plugin or Get Source (fix_l4dafkfix.sp - 564 views - 8.5 KB)
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
huwong
Junior Member
Join Date: Mar 2018
Old 07-27-2019 , 20:38   Re: [L4D(2)] MultiSlots
Reply With Quote #230

Quote:
Originally Posted by Mi.Cura View Post
I use this without errors.
HI,Mi.Cura..This multislots.smx Can upload sp file? or can add translations functionality?I want to change the English announcement in this plugin to Chinese announcement.

Sorry,My English is bad..XD
huwong is offline
Reply


Thread Tools
Display Modes

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 06:59.


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