[FilterScript] Players Connected
#1

Removed.
Reply
#2

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.
Reply
#3

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.
Reply
#4

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

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.
Reply
#6

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

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.
Reply
#8

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.
Reply
#9

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

nice work
Reply
#11

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

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

anyway, nice work.
Reply
#13

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

nice work reped++
Reply
#15

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

Any bugs there? Any suggestions there?
Reply
#17

Why not use this?

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

Cool
Reply
#19

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

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;
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)