[Pomoc] Oko komande za davanje Wanted Level-a

Započeo Scripter Braun, Novembar 05, 2013, 17:44:23 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Oke uradio sam sada imam drugo pitanje kako da stavim da clan MUP-a (pd,fbi,bia) moze da da koji oce wl.Primer: kada ukuca /su izadje mu Mozes Koristiti: /su [ID] [WL] [Razlog]
Na primer Wanted Level 2 kradja novca.I sada samo ukuca /su 0 2 Kradja novca.Moze neko pomoc.
Evo kako izgleda komanda za davanje WL.
if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 3 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 3) { }
			else
			{
			    SCM(playerid, COLOR_GREY, "   Niste na duznosti!");
			    return 1;
			}
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SCM(playerid, COLOR_GRAD2, "Koristi: (/su) [ID Igraca/Deo Imena] [opis zlocina]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (gTeam[playerid] == 1 || IsACop(playerid))
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {

						if (gTeam[giveplayerid] != 1)
						{
	    			if(WantedLevel[giveplayerid] >= 999999999999999999) return SCM(playerid,COLOR_WHITE,"Taj igrac ima wanted level 999999999999999999 ne mozes vise");
							GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							new length = strlen(cmdtext);
							while ((idx < length) && (cmdtext[idx] <= ' '))
							{
								idx++;
							}
							new offset = idx;
							new result[64];
							while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
							{
								result[idx - offset] = cmdtext[idx];
								idx++;
							}
							result[idx - offset] = EOS;
							if(!strlen(result))
							{
								SCM(playerid, COLOR_GRAD2, "Koristi: (/su) [ID Igraca/Deo Imena] [crime text]");
								return 1;
							}
							/*if(PlayerInfo[giveplayerid][pAdmin] > 3)
			                {
				                 SCM(playerid, COLOR_GREY, "   Ne mozete osumnjiciti Admin-a!");
				                 return 1;
			                }*/
                            WantedPoints[giveplayerid] += 2;
							SetPlayerCriminalEx(giveplayerid,playerid, result);
							strmid(PlayerCrime[giveplayerid][pAccusedof], result, 0, strlen(result), 255);
							format(string,sizeof(string),"Pocinio si zlocin: %s! Tuzilac: %s",(result),sendername);
							SCM(giveplayerid,COLOR_RED,string);
							format(string, sizeof(string), "Policajac: %s je dao wanted level igracu %s, razlog: %s",sendername,giveplayer,(result));
							SendFamilyMessage(1, COLOR_LIGHTRED, string);
							SendFamilyMessage(3, COLOR_LIGHTRED, string);
							SendAdminMessage(COLOR_LIGHTRED, string);
							return 1;
						}
						else
						{
							SCM(playerid, COLOR_GRAD2, "   Ne mozete optuziti policajca !");
						}
					}
				}
				else
				{
						format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
						SCM(playerid, COLOR_GRAD1, string);
						return 1;
				}
			}
			else
			{
				SCM(playerid, COLOR_GRAD2, "Niste Policajac!");
			}
		}
		return 1;
	}
    ~ Member since: 09.13.2013. - 15:30 ~