SA-MP Forums Archive
TopRich - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TopRich (/showthread.php?tid=604428)



TopRich - Loinal - 04.04.2016

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


Re: TopRich - Golden96 - 04.04.2016

What's wrong with it?


Re: TopRich - Barnwell - 04.04.2016

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



Re: TopRich - Barnwell - 04.04.2016

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!!!


Re: TopRich - Sew_Sumi - 05.04.2016

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...


Re: TopRich - Barnwell - 05.04.2016

I know, But im helping him


Re: TopRich - Sew_Sumi - 05.04.2016

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.


Re: TopRich - SyS - 05.04.2016

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


Re: TopRich - OmegaKiller72 - 05.04.2016

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?


Re: TopRich - K0P - 05.04.2016

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