SA-MP Forums Archive
[FilterScript] Players Connected - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Players Connected (/showthread.php?tid=322623)

Pages: 1 2 3


- Deathlane - 03.03.2012

Removed.


Re: Players Connected - [Cali]ChrOnic_T - 03.03.2012

Reputated Nice Job Bro anyways how its going didnt see u in a while?

I Kept the Credits In it, no worries

But

Код:
C:\Documents and Settings\EPUser\My Documents\AA- KingJ server Folder\Maps\Conect1.pwn(10) : fatal error 100: cannot read from file: "../include/gl_common.inc"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Players Connected - Ballu Miaa - 03.03.2012

I can press Tab and see how much player's are playing? Whats the point is wasting so much lines?

Useless i say! Sorry mate.


Re: Players Connected - [Cali]ChrOnic_T - 03.03.2012

Dude, Its not UseLess i dont feel like pressing tab all the time while it tells us on its own.


Re: Players Connected - suhrab_mujeeb - 03.03.2012

Quote:
Originally Posted by [Cali]ChrOnic_T
Посмотреть сообщение
Dude, Its not UseLess i dont feel like pressing tab all the time while it tells us on its own.
NO PAIN NO GAIN.


Re: Players Connected - Deathlane - 03.03.2012

@[Cali]ChrOnic_T Remove it then... It won't damage the script


Re: Players Connected - [Cali]ChrOnic_T - 03.03.2012

Still Fucked up

Код:
//----------------------------------------------------------
//  PlayersConnected
//  Created: Febuary 7 2012
//  By: Marc[Owner]
//----------------------------------------------------------

#include <a_samp>
#include <core>
#include <float>

new PlayersConnected = 0;

public OnFilterScriptInit()
{
        print("\n----------------------------------");
        print("Running PlayersConnected - by Marc");
        print("----------------------------------/n");
        return 1;
}

//----------------------------------------------------------

public OnPlayerConnect(playerid)
{
        new string[256];
        PlayersConnected++;
        //PlayersConnected += 1;
        format(string, sizeof(string), "(INFO) There are currently %d people in the server!", PlayersConnected);
        SendClientMessageToAll(0x00000000, string);
        return 1;
}

//----------------------------------------------------------

public OnPlayerDisconnect(playerid, reason)
{
    new string[256];
        PlayersConnected--;
        //PlayersConnected -= 1;
        format(string, sizeof(string), "(INFO) There are currently %d people in the server!", PlayersConnected);
        SendClientMessageToAll(0x00000000, string);
        return 1;
}

//----------------------------------------------------------






Look at the error



Код:
C:\Documents and Settings\EPUser\My Documents\AA- KingJ server Folder\Maps\Conect1.pwn(38) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Players Connected - Jack_SMalls - 03.03.2012

It is nice that is broadcasts to the entire server. People would probably not think to tab, and just see this info message across their screen. Nice.


Re: Players Connected - Deathlane - 03.03.2012

Tnx anyways ChrOnic on the part: OnPlayerDisconnect, Press TAB before "string[256];"


Re: Players Connected - Shahil kumar - 03.03.2012

nice work


Re: Players Connected - ddnbb - 03.03.2012

Obvious troll is obvious. This aint' a filterscript, this belongs to Useful Functions, though this doesnt seem like "useful" to me at all.


Re: Players Connected - DarkScripter - 03.03.2012

pawn Код:
new string[256];
Read this tуpic(Why you should not use 256).

anyway, nice work.


Re: Players Connected - Deathlane - 03.03.2012

Tnx anyways I created this my self... I did not copy this one...


Re: Players Connected - Sami Ham - 03.03.2012

nice work reped++


Re: Players Connected - Deathlane - 03.03.2012

Thank You Sami! Anyways I am Starting To Earn More Reputations Thank You!


Re: Players Connected - Deathlane - 03.03.2012

Any bugs there? Any suggestions there?


Re: Players Connected - Kyle - 03.03.2012

Why not use this?

pawn Код:
stock ReturnCountPlayers()
{
    new count = 0;
    foreach(Player, i)
    {
        if(UserInfo[i][Spawned] == 1)
        {
            count ++;
        }
    }
    return count;
}



Re: Players Connected - Bect - 03.03.2012

Cool


Re: Players Connected - Shadow_ - 03.03.2012

I was about to say the same thing as KyleSmith, you can make this so much easier with just 1 simple loop.


Re: Players Connected - eDz0r - 03.03.2012

Quote:
Originally Posted by [Cali]ChrOnic_T
Посмотреть сообщение
Still Fucked up

Код:
//----------------------------------------------------------
//  PlayersConnected
//  Created: Febuary 7 2012
//  By: Marc[Owner]
//----------------------------------------------------------

#include <a_samp>
#include <core>
#include <float>

new PlayersConnected = 0;

public OnFilterScriptInit()
{
        print("\n----------------------------------");
        print("Running PlayersConnected - by Marc");
        print("----------------------------------/n");
        return 1;
}

//----------------------------------------------------------

public OnPlayerConnect(playerid)
{
        new string[256];
        PlayersConnected++;
        //PlayersConnected += 1;
        format(string, sizeof(string), "(INFO) There are currently %d people in the server!", PlayersConnected);
        SendClientMessageToAll(0x00000000, string);
        return 1;
}

//----------------------------------------------------------

public OnPlayerDisconnect(playerid, reason)
{
    new string[256];
        PlayersConnected--;
        //PlayersConnected -= 1;
        format(string, sizeof(string), "(INFO) There are currently %d people in the server!", PlayersConnected);
        SendClientMessageToAll(0x00000000, string);
        return 1;
}

//----------------------------------------------------------






Look at the error



Код:
C:\Documents and Settings\EPUser\My Documents\AA- KingJ server Folder\Maps\Conect1.pwn(38) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
        new string[256];
        PlayersConnected--;
        //PlayersConnected -= 1;
        format(string, sizeof(string), "(INFO) There are currently %d people in the server!", PlayersConnected);
        SendClientMessageToAll(0x00000000, string);
        return 1;
}