shape1
shape2
shape3
shape4
shape7
shape8

Как сделать команду


Статус
Закрыто для дальнейших ответов.

denisz

Освоившийся
Пользователь
26.06.2014
294
26
0
21
Скриптер
Здравствуйте,как сделать команду чтобы сотрудник полиции писал команду и задержанный  тп в клетку

 

Sten

Unknown
Пользователь
08.05.2014
830
77
0
Команду /arrest ищите. Должна быть в каждом моде.

 

denisz

Освоившийся
Пользователь
26.06.2014
294
26
0
21
Скриптер
Команду /arrest ищите. Должна быть в каждом моде.
А что дальше?

Код:
if(strcmp(cmd, "/arrest", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(gTeam[playerid] == 2  || IsACop(playerid))
			{
				if(!PlayerToPoint(15.0, playerid, 400.0341, 611.8557, 11.6040))//
				{// Jail spo
					SendClientMessage(playerid, COLOR_GRAD2, "Âû íå â çäàíèè ÏÏÑ");
					return 1;
				}
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "Ïîäñêàçêà: /arrest [ID] [âðÿìÿ(â ñåêóíäàõ)] [øòðàô] [öåíà çàëîãà]");
					return 1;
				}
				new playa,time,price,zalog;
				playa = ReturnUser(tmp);
				tmp = strtok(cmdtext, idx);
				time= strval(tmp);
				if(time < 1 || time > 1200) { SendClientMessage(playerid, COLOR_GREY, "Âðåìÿ îò 1 ñåêóíäû äî 1200 ñåêóíä!"); return 1; }
				tmp = strtok(cmdtext, idx);
				price = strval(tmp);
				if(price < 500 || price > 100000) { SendClientMessage(playerid, COLOR_GREY, "Øòðàô è öåíà çàëîãà îò 500 ðóáëåé äî 100000 ðóáëåé!"); return 1; }
				tmp = strtok(cmdtext, idx);
				zalog = strval(tmp);
				if(zalog < 5000 || zalog > 1000000) { SendClientMessage(playerid, COLOR_GREY, "Öåíà çàëîãà îò 5.000 ðóáëåé äî 1.000.000 ðóáëåé!"); return 1; }
				if(IsPlayerConnected(playa))
				{
					if(GetDistanceBetweenPlayers(playerid,playa) < 5)
					{
						GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* Âû àðåñòîâàëè %s íà %d ñåêóíä, øòðàô: $%d, çàëîã: %d *", giveplayer,time,price,zalog);
						SendClientMessage(playerid, COLOR_GREY, string);
						GivePlayerMoney(playa, -price);
						format(string, sizeof(string), "* %s àðåñòîâàë òåáÿ íà %d, øòðàô: $%d, çàëîã: %d *", sendername,time,price,zalog);
						SendClientMessage(playa, COLOR_GREY, string);
						SendClientMessage(playa, COLOR_GREY, "×òîáû îïëàòèòü çàëîã, ïðîïèøèòå /bail");
						ResetPlayerWeapons(playa);
						new rtext[256];
						if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
						{
							if(PlayerInfo[playerid][pRank] == 1) { rtext = "Ðÿäîâîé ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Ìë. ñåðæàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Ñåðæàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Ñò. ñåðæàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Ñòàðøèíà ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Ìë. ëåéòåíàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 7) { rtext = "Ëåéòåíàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 8) { rtext = "Ñò. ëåéòåíàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 9) { rtext = "Êàïèòàí ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 10) { rtext = "Ìàéîð ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 11) { rtext = "Ïîäïîëêîâíèê ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 12) { rtext = "Ïîëêîâíèê ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 13) { rtext = "Ãåíåðàë-ìàéîð ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 14) { rtext = "Ãåíåðàë-ëåéòåíàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 15) { rtext = "Ãåíåðàë-ïîëêîâíèê ïîëèöèè"; }
							else { rtext = ""; }
						}
						if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
						{
							if(PlayerInfo[playerid][pRank] == 1) { rtext = "Ðÿäîâîé ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Ìë. ñåðæàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Ñåðæàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Ñò. ñåðæàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Ñòàðøèíà ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Ìë. ëåéòåíàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 7) { rtext = "Ëåéòåíàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 8) { rtext = "Ñò. ëåéòåíàíò ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 9) { rtext = "Êàïèòàí ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 10) { rtext = "Ìàéîð ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 11) { rtext = "Ïîäïîëêîâíèê ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 12) { rtext = "Ïîëêîâíèê ïîëèöèè"; }
							else if(PlayerInfo[playerid][pRank] == 13) { rtext = "Ãåíåðàë-ìàéîð ïîëèöèè"; }
							else { rtext = "Ðÿäîâîé ïîëèöèè"; }
						}
						if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
						{
							if(PlayerInfo[playerid][pRank] == 1) { rtext = "Ïðàïîðùèê"; }
							else if(PlayerInfo[playerid][pRank] == 2) { rtext = "Ñò. ïðàïîðùèê"; }
							else if(PlayerInfo[playerid][pRank] == 3) { rtext = "Ìë. ëåéòåíàíò"; }
							else if(PlayerInfo[playerid][pRank] == 4) { rtext = "Ëåéòåíàíò"; }
							else if(PlayerInfo[playerid][pRank] == 5) { rtext = "Ñò. ëåéòåíàíò"; }
							else if(PlayerInfo[playerid][pRank] == 6) { rtext = "Êàïèòàí"; }
							else if(PlayerInfo[playerid][pRank] == 7) { rtext = "Ìàéîð"; }
							else if(PlayerInfo[playerid][pRank] == 8) { rtext = "Ïîäïîëêîâíèê"; }
							else if(PlayerInfo[playerid][pRank] == 9) { rtext = "Ïîëêîâíèê"; }
							else { rtext = "Ïîëêîâíèê ÔÑÁ"; }
						}
						if(PlayerInfo[playerid][pMember]==6||PlayerInfo[playerid][pLeader] == 6)
						{
							format(string, sizeof(string), "%s %s îòäàë ïîä ñòðàæó %s ",rtext, sendername, giveplayer);
							SendClientMessageToAll(COLOR_ARREST, string);
						}
						else if(PlayerInfo[playerid][pMember]==6||PlayerInfo[playerid][pLeader]==6)
						{
							format(string, sizeof(string), "%s %s îòäàë ïîä ñòðàæó %s ",rtext, sendername, giveplayer);
							SendClientMessageToAll(COLOR_ARREST, string);
						}
						SetPlayerPos(playa,2573.3298,-2413.6565,22.4170);
						PlayerInfo[playa][pJailTime] = time;
						PlayerInfo[playa][pJailed] = 1;
						PlayerInfo[playa][pArrested] += 1;
						JailPrice[playerid] = zalog;
						WantedPoints[playa] = 0;
						WantLawyer[playa] = 1;
						TogglePlayerControllable(playa, 1);
						WantedLevel[giveplayerid] = 0;
						SetPlayerWantedLevel(giveplayerid,WantedLevel[giveplayerid] = 0);
						PlayerInfo[giveplayerid][pWantedPoints] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "   Íåïðàâèëüíûé ID!.");
					return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   Âû íå Ìèëèöèîíåð !");
				return 1;
			}
		}//not connected
		return 1;
	}
 

Sten

Unknown
Пользователь
08.05.2014
830
77
0
Что дальше. Сажаете его через эту команду. Пишите его ид, время и сажаете.

 

denisz

Освоившийся
Пользователь
26.06.2014
294
26
0
21
Скриптер
Что дальше. Сажаете его через эту команду. Пишите его ид, время и сажаете.
Ну так он вроде будет не за решеткой,а мне надо чтобы он сидел за решеткой  и всех и все видел кто ходил снаружи решетки

 

Sten

Unknown
Пользователь
08.05.2014
830
77
0
SetPlayerPos(playa,2573.3298,-2413.6565,22.4170);

Тут координаты меняйте куда нужно.

 
Статус
Закрыто для дальнейших ответов.