a small problem
#1

When I wrote this command, me show just my stats. And the other players do not show.

Код:
dcmd_rank( playerid, params[] )
{
	new id;
	if (strlen(params))
	{
	    id = strval(params);
	    if(IsPlayerConnected(id))
	    {
			new str[256];

			SendClientMessage(playerid,COLOR_YELLOW,"[FunZoneLT]>> Dabartinis lygis:");
			GetPlayerRank(playerid);
			format(str,sizeof(str),"[FunZoneLT]>> Nuzudymai: %d  Mirtys: %d ",GetPlayerKills(playerid),GetPlayerDeaths(playerid));
			SendClientMessage(playerid,0x00FF00AA,str);


	    }
	    else
	    {
	        SendClientMessage(playerid,0x00FF00AA, "[FunZoneLT]>> Tokio zaidejo nera.");
	    }
	}
	else
	{
	SendClientMessage(playerid,0x00FF00AA, "[FunZoneLT]>> /rank [zaidejoid]");

	}
	return 1;
}
Reply
#2

pawn Код:
SendClientMessageToAll(playerid,0x00FF00AA,str);
instead of
pawn Код:
SendClientMessage(playerid,0x00FF00AA,str);
.

As always, u can make your own loop, using this formula:
pawn Код:
for(new i = 0; i != MAX_PLAYERS; i++)
..

LetsOWN.
Reply
#3

Why
Код:
SendClientMessageToAll(playerid,0x00FF00AA,str);
?

My do not show the others players statistics, which show only mine.

where to put?
Код:
for(new i = 0; i != MAX_PLAYERS; i++)
?
Reply
#4

pawn Код:
dcmd_rank( playerid, params[] )
{
    new id;
    if (strlen(params))
    {
        id = strval(params);
        if(IsPlayerConnected(id))
        {
            new str[256];

            SendClientMessage(id,COLOR_YELLOW,"[FunZoneLT]>> Dabartinis lygis:");
            GetPlayerRank(id);
            format(str,sizeof(str),"[FunZoneLT]>> Nuzudymai: %d  Mirtys: %d ",GetPlayerKills(id),GetPlayerDeaths(id));
            SendClientMessage(id,0x00FF00AA,str);


        }
        else
        {
            SendClientMessage(playerid,0x00FF00AA, "[FunZoneLT]>> Tokio zaidejo nera.");
        }
    }
    else
    {
    SendClientMessage(playerid,0x00FF00AA, "[FunZoneLT]>> /rank [zaidejoid]");

    }
    return 1;
}
This one should work!
Reply
#5

Now show only my statistic! And other players do not show! Me need that other players statistic show, also me statistic, wrote its id. You know?
Reply
#6

Me need that you speak english.
Reply
#7

Other players' statistics do not show, only mine.
Reply
#8

No one knows?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)