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

How to get amount of players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doggg
Member
Join Date: Jun 2018
Old 03-17-2020 , 16:32   How to get amount of players
Reply With Quote #1

Hey there, I just got back from a long time without coding here.
So, Heres what i want to do, I want u to guide me and not just tell me the answer (tell me what commands i should be using and help me out here).
i want to get the amout of players that are in the server (how do i get this?).
if the amount of CT players is lower then 3 i want to move one RANDOM player to the T side.
if it is higher i want to divide the number (for example - 25 div 3 = 8 meaning - using int variable).
so whats is the command i should be using? can u link me some wiki of commands?
Thanks!

Last edited by Doggg; 03-17-2020 at 16:33.
Doggg is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 03-18-2020 , 09:16   Re: How to get amount of players
Reply With Quote #2

Hi,

MaxClients
IsClientInGame
IsFakeClient
GetClientTeam
PHP Code:
#include <cstrike>
//CS_TEAM_T = 2
//CS_TEAM_CT = 3 
RoundToCeil
GetRandomInt
CS_SwitchTeam

Plugin: [CSS/CSGO] Move Commands (ResetScore, Switch, Spec)

Tutorials:
Introduction to SourcePawn
New API and Syntax
[TUT] SourcePawn Scripting - Tips, Basics to Advanced
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas 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 20:57.


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