#1

Hi, i have a problem with a police command /wanted

Код:
	if(!strcmp(cmdtext, "/wanted", true))
  {
		new zin[256] = "Police wanted players:";
  	new name[MAX_PLAYER_NAME];
  	for(new i = 0; i <MAX_PLAYERS; i++){
			if(IsPlayerConnected(i) && GetPlayerWantedLevel(i)>0){
				GetPlayerName(i,name,MAX_PLAYER_NAME);
				format(zin,256,"%s %s(%i lygiu),",zin,name,GetPlayerWantedLevel(i));
			}
		}
		SendClientMessage(playerid,COLOR,zin);
		return 1;
	}
And in game it looks like ->>>
Код:
Police wanted players:name,name,name......
but i want that ir shows like this:
Код:
Police wanted players:
name,
name,....
Can you help me?
Sorry for my bad english.
Reply
#2

You have to use a different SendClientMessage to get a different line.
Reply
#3

hmm i don't understand you ;/
Reply
#4

pawn Код:
SendClientMessage(playerid, COLOR_RED, "line1, line2, line3");
SendClientMessage(playerid, COLOR_RED, "line 1");
SendClientMessage(playerid, COLOR_RED, "line 2");
SendClientMessage(playerid, COLOR_RED, "line 3");
Ingame:
Код:
line1, line2, line3
line1
line2
line3
Reply
#5

but it looks like
Код:
Message:
Name,
name...
and the names will be not different, always the same name.
Reply
#6

How should it look like?
Reply
#7

For example:
Код:
Police wanted players:
Kevin(5 stars),
Bob(2 stars),
Richard(7 stars),
Reply
#8

pawn Код:
SendClientMessage(playerid,color,"Police wanted players:"); //not in the loop.
format(string,sizeof(string),"%s (%d stars).",playername(i),GetPlayerWantedLevel(i)); // into the loop.
SendClientMessage(playerid,color,string); // into the loop.
Reply
#9

new playername[MAX_PLAYER_NAME];
?
if its true, then 4 errors:
pawn Код:
D:\Documents and Settings\Rokis`\Desktop\gta\SERVAS\LV\gamemodes\GRP4.pwn(2713) : error 012: invalid function call, not a valid address
D:\Documents and Settings\Rokis`\Desktop\gta\SERVAS\LV\gamemodes\GRP4.pwn(2713) : warning 215: expression has no effect
D:\Documents and Settings\Rokis`\Desktop\gta\SERVAS\LV\gamemodes\GRP4.pwn(2713) : error 001: expected token: ";", but found ")"
D:\Documents and Settings\Rokis`\Desktop\gta\SERVAS\LV\gamemodes\GRP4.pwn(2713) : error 029: invalid expression, assumed zero
D:\Documents and Settings\Rokis`\Desktop\gta\SERVAS\LV\gamemodes\GRP4.pwn(2713) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#10

So can you helpme?
Sorry for Double-Post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)