Jump to content
  • 0

[GF/RP] problema /wanted


Question

Posted

am si io comanda /wanted

dar cand dau /wanted si un player are wanted nu arata wantedul

	if(strcmp(cmd, "/wanted", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	   	{
			if(gTeam[playerid] == 2 || IsACop(playerid))
			{
				new x;
                SCM(playerid, COLOR_LIGHTRED, "|_____________________________ 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) {
							    SCM(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] = '.';
				    SCM(playerid, COLOR_YELLOW, string);
				}
			}
			else
			{
			    SCM(playerid, COLOR_GREY, "   You're not a Cop / FBI / National Guard !");
			}
		}//not connected
		return 1;
	}

1 answer to this question

Recommended Posts

Posted

Incearca:

if(strcmp(cmd, "/wanted", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
		 if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
		 {
			SendClientMessage(playerid, COLOR_GREY, "...::: Wanted List :::...");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				   	if(WantedLevel[i] >= 2)
				    {
                        GetPlayerName(i, giveplayer, sizeof(giveplayer));
						format(string, sizeof(string), "[ID: %d] Name: %s - Wanted Level: %d", i,giveplayer,WantedLevel[i]);
						SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
			}
		  }
		  else
		  {
			 SendClientMessage(playerid,COLOR_GREY,"You are not Police Departament,FBI or National Guard !");
		  }
		}
		return 1;
	}

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.