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
#2

Have a look at:

https://sampwiki.blast.hk/wiki/TextDrawSetString
Reply
#3

He Said "ANYONE CAN MAKE THIS CODE" ?
Reply
#4

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.
Reply
#5

i tried it but i can't do it working :d

PS. I made it but i can't do autoupdating list yet.
Reply
#6

i made this script, thanks for function :d can be lock
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)