TopRich
#1

iam trying to make /toprich command in my gamemode but i cant need help
Reply
#2

What's wrong with it?
Reply
#3

If you can't
i make one for you

pawn Код:
CMD:richlist(playerid, params[])//509
{
    if(IsPlayerConnected(playerid))
    {
        SCM(playerid, COLOR_GRAD3, "Rich Users online:");
        new string[128];
        foreach(Player, i)
        {
            if(IsPlayerConnected(i))
            {
                if(GetPlayerCash(i) >= 100000 || PlayerInfo[i][pAccount] >= 100000)
                {
                    format(string, sizeof(string), "%s (%d) - In Hand: $%d | In Bank: $%d", GPN(i), i, GetPlayerCash(i), PlayerInfo[i][pAccount]);
                    SCM(playerid, COLOR_GRAD1, string);
                }
            }
        }
    }
    return 1;
}
Reply
#4

and add that
pawn Код:
enum pInfo
{
pAccount
};
Or if you already have paccount or something like that
you will change paccount example: pmoney like that
DONT FORGET!!!
Reply
#5

Quote:
Originally Posted by Loinal
Посмотреть сообщение
iam trying to make /toprich command in my gamemode but i cant need help
Remember, this is Scripting Help, not Scripting Requests...
Reply
#6

I know, But im helping him
Reply
#7

Quote:
Originally Posted by Barnwell
Посмотреть сообщение
I know, But im helping him
You may think you are, but you're not...


And the statement was to him, directly, about the fact that this is a common occurence...


"Oh I'm just trying to make XXX command for my server, and I can't get this working, can someone help me"

"Sure, Pastes up command"

"Can't get it working"

"Try this"

"Nope, still not working, Anyone please, I need this for my server"

"Hope this works"

"Nope doesn't"


This is what the threads generally end up as.

And, furthermore, there are rules about these sections, one of which, is not posting up untested code, another of which is not to post up topics like these without code, and best of all, that this section isn't for requests, but help.


And this, isn't help. They're not learning, and you are simply pasting up attempts.
Reply
#8

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
You may think you are, but you're not...


And the statement was to him, directly, about the fact that this is a common occurence...


"Oh I'm just trying to make XXX command for my server, and I can't get this working, can someone help me"

"Sure, Pastes up command"

"Can't get it working"

"Try this"

"Nope, still not working, Anyone please, I need this for my server"

"Hope this works"

"Nope doesn't"


This is what the threads generally end up as.

And, furthermore, there are rules about these sections, one of which, is not posting up untested code, another of which is not to post up topics like these without code, and best of all, that this section isn't for requests, but help.


And this, isn't help. They're not learning, and you are simply pasting up attempts.
Absolutely right i agree with him.People should know the basics before doing anything
Reply
#9

Quote:
Originally Posted by Barnwell
Посмотреть сообщение
If you can't
i make one for you

pawn Код:
CMD:richlist(playerid, params[])//509
{
    if(IsPlayerConnected(playerid))
    {
        SCM(playerid, COLOR_GRAD3, "Rich Users online:");
        new string[128];
        foreach(Player, i)
        {
            if(IsPlayerConnected(i))
            {
                if(GetPlayerCash(i) >= 100000 || PlayerInfo[i][pAccount] >= 100000)
                {
                    format(string, sizeof(string), "%s (%d) - In Hand: $%d | In Bank: $%d", GPN(i), i, GetPlayerCash(i), PlayerInfo[i][pAccount]);
                    SCM(playerid, COLOR_GRAD1, string);
                }
            }
        }
    }
    return 1;
}
Where is your looping throw all connected players?
Reply
#10

Quote:
Originally Posted by Barnwell
Посмотреть сообщение
If you can't
i make one for you

pawn Код:
CMD:richlist(playerid, params[])//509
{
    if(IsPlayerConnected(playerid))
    {
        SCM(playerid, COLOR_GRAD3, "Rich Users online:");
        new string[128];
        foreach(Player, i)
        {
            if(IsPlayerConnected(i))
            {
                if(GetPlayerCash(i) >= 100000 || PlayerInfo[i][pAccount] >= 100000)
                {
                    format(string, sizeof(string), "%s (%d) - In Hand: $%d | In Bank: $%d", GPN(i), i, GetPlayerCash(i), PlayerInfo[i][pAccount]);
                    SCM(playerid, COLOR_GRAD1, string);
                }
            }
        }
    }
    return 1;
}
Код:
if(IsPlayerConnected(playerid))
Lol what is the need of checking that the the "player" is connected or not
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)