Help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help (
/showthread.php?tid=89836)
Help -
Rokis - 04.08.2009
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.
Re: Help -
Joe Staff - 04.08.2009
You have to use a different SendClientMessage to get a different line.
Re: Help -
Rokis - 05.08.2009
hmm i don't understand you ;/
Re: Help -
dice7 - 05.08.2009
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
Re: Help -
Rokis - 05.08.2009
but it looks like
Код:
Message:
Name,
name...
and the names will be not different, always the same name.
Re: Help -
MenaceX^ - 05.08.2009
How should it look like?
Re: Help -
Rokis - 05.08.2009
For example:
Код:
Police wanted players:
Kevin(5 stars),
Bob(2 stars),
Richard(7 stars),
Re: Help -
MenaceX^ - 05.08.2009
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.
Re: Help -
Rokis - 05.08.2009
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.
Re: Help -
Rokis - 05.08.2009
So can you helpme?
Sorry for Double-Post.