Textdraw with some players name
#1

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;
	}
Reply


Messages In This Thread
Textdraw with some players name - by shaPP - 11.03.2011, 07:10
Re: Textdraw with some players name - by Stigg - 11.03.2011, 10:02
Re: Textdraw with some players name - by Roomeo - 11.03.2011, 10:03
Re: Textdraw with some players name - by Stigg - 11.03.2011, 10:06
Re: Textdraw with some players name - by shaPP - 11.03.2011, 10:47
Re: Textdraw with some players name - by shaPP - 11.03.2011, 12:07

Forum Jump:


Users browsing this thread: 2 Guest(s)