Textdraw with some players name - 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: Textdraw with some players name (
/showthread.php?tid=238162)
Textdraw with some players name -
shaPP - 11.03.2011
I need this code to make a wanted list in textdraw, autoupdating for my server but i'm not sure this is possible. When a cop type /wanted, will appear wanted list in textdraw end disappear when type again /wanted. Can make someone this code?
Код:
if(strcmp(cmd, "/wanted", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
new x;
SendClientMessage(playerid, COLOR_GREEN, "Current Wanted Suspects:");
for(new i=0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i))
{
if(WantedLevel[i] > 1)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s%s: %d", string,giveplayer,WantedLevel[i]);
x++;
if(x > 3) {
SendClientMessage(playerid, COLOR_YELLOW, string);
x = 0;
format(string, sizeof(string), "");
} else {
format(string, sizeof(string), "%s, ", string);
}
}
}
}
if(x <= 3 && x > 0) {
string[strlen(string)-2] = '.';
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You're not a Cop / FBI / National Guard !");
}
}//not connected
return 1;
}
Re: Textdraw with some players name -
Stigg - 11.03.2011
Have a look at:
https://sampwiki.blast.hk/wiki/TextDrawSetString
Re: Textdraw with some players name -
Roomeo - 11.03.2011
He Said "ANYONE CAN MAKE THIS CODE" ?
Re: Textdraw with some players name -
Stigg - 11.03.2011
Quote:
Originally Posted by Roomeo
He Said "ANYONE CAN MAKE THIS CODE" ?
|
And i said "Have a look at:"
https://sampwiki.blast.hk/wiki/TextDrawSetString
Then he will see how easy it is to make himself.
Re: Textdraw with some players name -
shaPP - 11.03.2011
i tried it but i can't do it working :d
PS. I made it but i can't do autoupdating list yet.
Re: Textdraw with some players name -
shaPP - 11.03.2011
i made this script, thanks for function :d can be lock