Jump to content
  • 0

Question

Posted

As dori daca jucatorul are RaceParticipant == 1 , sa apara pe lista cand scrii nrlist sa apara numele jucatorului cu raceparticipant == 1.

Nu inteleg ce am gresit .

dcmd_nrlist(playerid,params[])
{
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(RaceParticipant[i] == 1)
				{
	                 	new rentstringz[128];
	                 	new sendername[MAX_PLAYER_NAME];
	                	GetPlayerName(i,sendername,128);
	                	format(rentstringz,128," - %s [ID:%d] ", sendername,i);
		                SendClientMessage(i,COLOR_YELLOW,rentstringz);
		                }
	                 return 1;
	}

3 answers to this question

Recommended Posts

Posted

As dori daca jucatorul are RaceParticipant == 1 , sa apara pe lista cand scrii nrlist sa apara numele jucatorului cu raceparticipant == 1.

Nu inteleg ce am gresit .

dcmd_nrlist(playerid,params[])
{
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(RaceParticipant[i] == 1)
				{
	                 	new rentstringz[128];
	                 	new sendername[MAX_PLAYER_NAME];
	                	GetPlayerName(i,sendername,MAX_PLAYER_NAME); // 128 transformat in MAX_PLAYER_NAME
	                	format(rentstringz,128," - %s [ID:%d] ", sendername,i);
		                SendClientMessage(playerid,COLOR_YELLOW,rentstringz); // schimbat i in playerid - tu ii trimiteai mesaj jucatorului care era RaceParticipant cand defapt trebuia sa ti-l trimiti tie, ca sa ii vezi lui numele.
		                }
                         }
	                 return 1;
}

Am fixat, explicatiile ar trebui sa fie in cod. Zi daca mai sunt probleme.

Posted

tot degeaba.. nu reactioneaza cu nimic comanda can dau /rentlist ..!

Eu vreau daca jucatorul are "RaceParticipant == 1" sa apara pe o lista .. care o poate vedea oricine , gen /helpers

Posted

[pawn]

dcmd_nrlist(playerid,params[])

{

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

if(RaceParticipant == 1)

{

new sendername[MAX_PLAYER_NAME];

GetPlayerName(i,sendername,MAX_PLAYER_NAME); // 128 transformat in MAX_PLAYER_NAME

format(rentstringz,128," - %s [iD:%d] ", sendername,i);

SendClientMessage(playerid, COLOR_YELLOW, rentstringz);

}

}

}

return 1;

}

[/pawn]

Problema rezolvata, avea dcmd(..8..); si trebuia 6.

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.