shape1
shape2
shape3
shape4
shape7
shape8

Нужна помощь с камандой /arrest


pallatov

Освоившийся
Пользователь
05.08.2014
325
16
0
Добрый день как сделать чтобы при вводе команды /arrest Не только залючонному выводилось сообшение а тпехало в кпз 

Код:
	if(strcmp(cmd, "/arrest", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "* Èñïîëüçóéòå: /arrest [id èãðîêà/÷àñòü íèêà] [âðåìÿ(ìèíóòû)] ");
				return 1;
			}
			new playa;
			new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if (IsACop(playerid))
			{
			    if(OnDuty[playerid] != 1)
				{
				    SendClientMessage(playerid, COLOR_GREY, "*Âû íå ïðè èñïîëíåíèè, âîçüìèòå çíà÷îê â ðàçäåâàëêå");
				    return 1;
				}
		        if(!PlayerToPoint(3.0, playerid, -360.6164,2512.2109,-33.9141) && !PlayerToPoint(3.0, playerid, 227.3720,114.9162,999.0156) && !PlayerToPoint(3.0, playerid, 190.1088,177.4878,1003.0234))
				{// Jail spot
				    SendClientMessage(playerid, COLOR_GREY, "*Àðåñòîâûâàòü ìîæíî òîëüêî ó êàìåðû");
				    return 1;
				}
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
			            if(!ProxDetectorS(5.0, playerid, playa))
			            {
			                SendClientMessage(playerid, COLOR_GREY, "*Èãðîê äàëåêî îò âàñ");
			                return 1;
			            }
			            if(money > 50 || money < 20)
			            {
			                SendClientMessage(playerid, COLOR_GREY, "*Ìàêñèìàëüíîå âðåìÿ - 50 ìèíóò, ìèíèìàëüíîå - 20 ìèíóò");
			                return 1;
						}
				        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, sizeof(string), "* Âû ïîñàäèëè %s.", giveplayer);
						SendClientMessage(playerid, COLOR_LIGHTRED, string);
						format(string, sizeof(string), "* Âû ïîñàæåíû êîïîì %s. ", sendername);
						SendClientMessage(playa, COLOR_LIGHTRED, string);
						aResetPlayerWeapons(playa);
						if(PlayerInfo[playa][pBabki] > PlayerInfo[playa][pWanted]*10)
						{
							PlayerInfo[playerid][pBabki] += PlayerInfo[playa][pWanted]*10;
							PlayerInfo[playa][pBabki] -= PlayerInfo[playa][pWanted]*10;
						}
						PlayerInfo[playa][pWanted] = 0;
						PlayerInfo[playa][pJailed] = 1;
						PlayerInfo[playa][pJailTime] = money*60;
						if(PlayerToPoint(3.0, playerid, 268.3327,77.8972,1001.0391))
						{
							SetPlayerInterior(playa, 6);
							aSetPlayerPos(playa, 264.6288,77.5742,1001.0391);
						}
						if(PlayerToPoint(3.0, playerid, 227.3720,114.9162,999.0156))
						{
							SetPlayerInterior(playa, 10);
							aSetPlayerPos(playa, 227.4339,110.1801,999.0156);
						}
						format(string, sizeof(string), "*Âû ïîñàæåíû íà %d ìèíóò. ", money);
						SendClientMessage(playa, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), " *Âû çàðàáîòàëè $", money*60);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), " *Ó âàñ çàáðàëè $", money*60);
						SendClientMessage(playa, COLOR_RED, string);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "*Íåò ïðàâ íà èñïîëüçîâàíèå êîìàíäû! ");
			}
		}
		return 1;
	}