[Ajuda] cada /su da certo nivel de procurado
#1

Код:
	if(strcmp(cmd, "/suspeito", true) == 0 || strcmp(cmd, "/su", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pDuty] == 0)
			{
			    SendClientMessage(playerid, COLOR_GREY, "   Voce nao bateu cartao!");
			    return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: (/su)speito [playerid/PartOfName] [crime]");
				return 1;
			}
			if(PlayerInfo[playerid][pDBanned] == 1)
			{
			    SendClientMessage(playerid, COLOR_GREY, "** Voce foi banido do servico policial!");
			    return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (IsACop(playerid) || IsAFreecop(playerid))
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[128];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_GRAD2, "USE: (/su)speito [playerid/PartOfName] [crime texto]");
							return 1;
						}
						if(strcmp(result,"DOP",true) == 0) { result = "Desobediкncia a Ordem Policial"; }
						if(strcmp(result,"dop",true) == 0) { result = "Desobediкncia a Ordem Policial"; }
						if(strcmp(result,"TH",true) == 0) { result = "Tentativa de Homicнdio"; }
						if(strcmp(result,"th",true) == 0) { result = "Tentativa de Homicнdio"; }
						if(strcmp(result,"rp",true) == 0) { result = "Resistкncia a Prisгo"; }
						if(strcmp(result,"RP",true) == 0) { result = "Resistкncia a Prisгo"; }
						if(strcmp(result,"ILR",true) == 0) { result = " Invasгo de Local Restrito";}
						if(strcmp(result,"ilr",true) == 0) { result = " Invasгo de Local Restrito";}
						if(strcmp(result,"pim",true) == 0) { result = "Porte Ilegal de Materiais ";}
						if(strcmp(result,"PIM",true) == 0) { result = "Porte Ilegal de Materiais ";}
						if(strcmp(result,"PIA",true) == 0) { result = "Porte Ilegal de Arma ";}
						if(strcmp(result,"pia",true) == 0) { result = "Porte Ilegal de Arma ";}
						if(strcmp(result,"PD",true) == 0) { result = "Porte de Drogas";}
						if(strcmp(result,"pd",true) == 0) { result = "Porte de Drogas";}
						if(strcmp(result,"cp",true) == 0) { result = "Cumplice de Crime";}
						if(strcmp(result,"CP",true) == 0) { result = "Cumplice de Crime";}
						if(strcmp(result,"AFP",true) == 0) { result = "Agresгo Fisica ao um Policial";}
						if(strcmp(result,"afp",true) == 0) { result = "Agresгo Fisica ao um Policial";}
						if(strcmp(result,"AP",true) == 0) { result = "Ajuste de Pena";}
						if(strcmp(result,"ap",true) == 0) { result = "Ajuste de Pena";}
						if(IsACop(giveplayerid))
						{
						    if(PlayerInfo[playerid][pRank] >= 6)
						    {
								if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
								else { WantedPoints[giveplayerid]+= 2; }
								SetPlayerCriminalEx(giveplayerid,playerid, result);
							}
							else
							{
							    SendClientMessage(playerid, COLOR_GREY,"* Seu Ranking deve ser maior ou igual a 6 a suspeitar de outros policiais");
							    return 1;
							}
						}
						else if(IsAFreecop(giveplayerid))
						{
							if(PlayerInfo[playerid][pRank] >= 3)
						    {
								if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
								else { WantedPoints[giveplayerid]+= 2; }
								SetPlayerCriminalEx(giveplayerid,playerid, result);
							}
							else
							{
							    SendClientMessage(playerid, COLOR_GREY,"*Seu Ranking deve ser maior ou igual a 3 a suspeitar de seguranзas");
							    return 1;
							}
						}
						else
						{
						    if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 6; }
							else { WantedPoints[giveplayerid]+= 2; }
							SetPlayerCriminalEx(giveplayerid,playerid, result);
						}
						new y, m, d;
						new h,mi,s;
						getdate(y,m,d);
						gettime(h,mi,s);
						format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /suspeito %s %s",d,m,y,h,mi,s,sendername, giveplayer, (result));
						CommandLog(string);
						return 1;
					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD2, "** Voce nao pode dar su num Policial !");
					}
				}
			}
Reply


Messages In This Thread
cada /su da certo nivel de procurado - by loukofire - 01.12.2012, 18:11
Re: cada /su da certo nivel de procurado - by Kmatsu - 01.12.2012, 18:54
Re: cada /su da certo nivel de procurado - by Gleisson_. - 01.12.2012, 20:05
Re: cada /su da certo nivel de procurado - by Lucaz_Nunes - 02.12.2012, 01:03
Re: cada /su da certo nivel de procurado - by sofina - 02.12.2012, 09:17
Re: cada /su da certo nivel de procurado - by sofina - 02.12.2012, 09:25
Re: cada /su da certo nivel de procurado - by loukofire - 03.12.2012, 03:30

Forum Jump:


Users browsing this thread: 3 Guest(s)