SA-MP Forums Archive
Command show problem , help please. - 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: Command show problem , help please. (/showthread.php?tid=535141)



Command show problem , help please. - buburuzu19 - 02.09.2014

So when you type /helpers only the helpers can see the other helpers .
Ex: If you are a normal player , and on the server are connected 5 helpers , if u type /helpers you don't see nothing.

So i want that normal players can see the other helpers.


Re: Command show problem , help please. - Stinged - 02.09.2014

You're checking if playerid is a helper.
pawn Код:
if(playerVariables[playerid][pHelper] == ...)
pawn Код:
if(playerVariables[i][pHelper] == ...)



Re: Command show problem , help please. - buburuzu19 - 02.09.2014

Ok i will try and i come with reply


Re: Command show problem , help please. - IceBilizard - 02.09.2014

pawn Код:
CMD:helpers(playerid,params[])
{
    new count = 0;
    new string[128];
    new name1[MAX_PLAYER_NAME];
    SendClientMessage(playerid, COLOR_TEAL, "--------------------------------Helpers Online---------------------------");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
            GetPlayerName(i,name1,MAX_PLAYER_NAME);
            if(playerVariables[i][pHelper] >= 1)
            {
                format(string, 128, "%s", GetName(i));
                SendClientMessage(playerid, COLOR_WHITE, string);
                count++;
            }
        }
    }
    if (count == 0)
    SendClientMessage(playerid,COLOR_GREY,"There are no Helpers Online at the moment");
    SendClientMessage(playerid, COLOR_TEAL, "-------------------------------------------------------------------------------");
    SendClientMessage(playerid, COLOR_WHITE,"-====-=-=-=--------- /n.");
    SendClientMessage(playerid, COLOR_TEAL, "-------------------------------------------------------------------------------");
    return 1;
}



Re: Command show problem , help please. - buburuzu19 - 02.09.2014

Ice blizzard i don't want to be /helpers with levels i want to name the levels, understand me?


Re: Command show problem , help please. - IceBilizard - 02.09.2014

Quote:
Originally Posted by buburuzu19
Посмотреть сообщение
Ice blizzard i don't want to be /helpers with levels i want to name the levels, understand me?
No i didn't understand what you wean You want it name the levels?


Re: Command show problem , help please. - buburuzu19 - 02.09.2014

Yes , as can you see i put them names
if(playerVariables[i][pHelper] == 1) , format(string, 128, "(%d) 1Helper , 1 Helper is the name.
I will test now what stinged posted.


Re: Command show problem , help please. - IceBilizard - 02.09.2014

its simple use

pawn Код:
format(string, 128, "(%d) %d Helper %s",i,i, name1);



Re: Command show problem , help please. - buburuzu19 - 02.09.2014

Problem solved.!


Re: Command show problem , help please. - IceBilizard - 02.09.2014

Good well my code or another's one?