SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 28/01/2015, 12:48 PM   #1
Razturach
Little Clucker
 
Join Date: Jan 2015
Posts: 41
Reputation: 5
Default Counting player online?

Hello!

I'm wondering how it's possible to do code that will count players online, yeah I know that samp program is couting them already in samp browser but I just have little idea how I will use that code. If I'm right I should somehow open Loop OnPlayerConnect and variable that will count players that Connect and Disconnect but I'm not sure how to do that so I'm asking for help.

Thank you for answers, tips in advance.
Razturach is offline   Reply With Quote
Old 28/01/2015, 02:07 PM   #2
DobbysGamertag
Gangsta
 
DobbysGamertag's Avatar
 
Join Date: Jan 2013
Location: England
Posts: 807
Reputation: 100
Default Re: Counting player online?

Iter_Count(Player);. No need for a loop.

pawn Code:
new string[128];
format(string,sizeof(string),"There are %d connected players.",Iter_Count(Player));
SendClientMessage(playerid, -1, string);
__________________

Releases:
[include] SAMP Dynamic Zones - An up to date a_zones.inc
DobbysGamertag is offline   Reply With Quote
Old 28/01/2015, 06:10 PM   #3
Razturach
Little Clucker
 
Join Date: Jan 2015
Posts: 41
Reputation: 5
Default Re: Counting player online?

Ty, repped
Razturach is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Player is not online bug s0ZNIz Scripting Help 4 23/11/2014 02:28 PM
how to use dini save online player in to file every time player enter or out Chrisli520 Scripting Help 1 31/10/2013 07:04 AM
[FilterScript] BRecord - Online Player Peak Recording - View your player peak fast, accurate and easily! [MWR]Blood Filterscripts 10 29/10/2012 02:43 PM
Player online Speed Help Archive 2 15/08/2011 09:11 PM
Online Player Map Claude_CJ_Vercetti Help Archive 1 26/04/2011 12:23 PM


All times are GMT. The time now is 04:54 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.