Arslan_Safiullin
Сообщение # 1 | 19:13:11 03 Фев 2013
Пользователи
Сообщений: 1
Здравия. товарищи форумчане. У меня проблема с командой ареста для полицейских LS. Значит команда ареста вводится у дверей ЛСПД в гараже и преступник должен сажаться в тюрьму, но при вводе команды ареста, игрок не арестовывается, а просто стоит на месте, и у него высвечивается "+1". Вот код:
Код
Create3DTextLabel( "/arrest àðåñòîâàòü ïðåñòóïíèêà", COLOR_REDD, 1558.9213,-1696.5719,5.8970, 8.0, 0 )
Код
} if(strcmp(cmd, "/arrest", true) == 0) { if(IsACop(playerid)) { if(PlayerToPoint(10.0, playerid, 226.6843,114.8017,999.1649) || PlayerToPoint(10.0, playerid, 216.7673,118.8763,999.1722) || PlayerToPoint(6.0, playerid, 188.7124,157.6917,1003.0234)|| PlayerToPoint(6.0, playerid, 218.2263,114.9286,999.0156) || PlayerToPoint(6.0, playerid, 198.3940,157.9389,1003.0234)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "::: Ââåäèòå: /arrest [âðåìÿ]"); new time = strvalEx(tmp); if(time < 1 || time > 20) { SendClientMessage(playerid, COLOR_GREY, "Îò 1 ìèíóòû äî 20!!"); return 1; } tmp = strtok(cmdtext, idx); new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(ProxDetectorS(4.0, playerid, suspect)) { GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(WantedLevel[suspect] < 1) return SendClientMessage(playerid, COLOR_GREY, "×åëîâåê äîëæåí èìåòü õîòÿ áû îäèí óðîâåíü ðîçûñêà!"); format(string, sizeof(string), "Âû àðåñòîâàëè %s", giveplayer); SendClientMessage(playerid, COLOR_WHITE, string); PlayerInfo[suspect][pCash]-=1; PlayerInfo[playerid][pCash]+=1; format(string, sizeof(string), "~r~+1", sendername); GameTextForPlayer(suspect, string, 5000, 5); Delgun(suspect); ResetPlayerWeapons(suspect); if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1) { format(string, sizeof(string), "<< Îôèöåð %s àðåñòîâàë %s >>", sendername, giveplayer); SendClientMessageToAll(COLOR_LIGHTRED, string); } else if(PlayerInfo[playerid][pMember]==10||PlayerInfo[playerid][pLeader]==10) { format(string, sizeof(string), "<< Îôèöåð %s àðåñòîâàë %s >>", sendername, giveplayer); SendClientMessageToAll(COLOR_LIGHTRED, string); } else if(PlayerInfo[playerid][pMember]==21 || PlayerInfo[playerid][pLeader]==21) { format(string, sizeof(string), "<< Îôèöåð %s àðåñòîâàë %s >>", sendername, giveplayer); SendClientMessageToAll(COLOR_LIGHTRED, string); } else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2) { format(string, sizeof(string), "<< Àãåíò ÔÁÐ %s àðåñòîâàë %s >>", sendername, giveplayer); SendClientMessageToAll(COLOR_LIGHTRED, string); } if(PlayerToPoint(10.0, playerid, 226.6843,114.8017,999.1649)) { SetPlayerInterior(suspect, 6); SetPlayerPos(suspect,227.3453,110.0707,999.3311); SetPlayerFacingAngle(suspect, 263.0160); PlayerInfo[suspect][pJailed] = 1; PlayerInfo[suspect][pZvezdi] =0; PlayerInfo[suspect][pJailTime] = time * 60; PlayerInfo[suspect][pArrested] += 1; WantedPoints[suspect] = 0; WantedPoints[suspect]--; PlayerInfo[suspect][pMestoJail] = 1; SetPlayerWantedLevel(suspect, 0); WantedLevel[suspect] = 0; } else if(PlayerToPoint(6.0, playerid, 218.2263,114.9286,999.0156)) { SetPlayerInterior(suspect, 10); SetPlayerPos(suspect,219.5400,109.9767,999.0156); SetPlayerFacingAngle(suspect, 1.0000); PlayerInfo[suspect][pJailed] = 1; PlayerInfo[suspect][pJailTime] = time * 60; PlayerInfo[suspect][pArrested] += 1; WantedPoints[suspect] = 0; WantedLevel[suspect] = 0; PlayerInfo[suspect][pZvezdi] =0; WantedPoints[suspect]--; PlayerInfo[suspect][pMestoJail] = 2; SetPlayerWantedLevel(suspect, 0); } else if(PlayerToPoint(6.0, playerid, 198.3940,157.9389,1003.0234)) { SetPlayerInterior(suspect, 3); SetPlayerPos(suspect,198.3642,161.8103,1003.0300); SetPlayerFacingAngle(suspect, 1.0000); PlayerInfo[suspect][pJailed] = 1; PlayerInfo[suspect][pJailTime] = time * 60; PlayerInfo[suspect][pArrested] += 1; WantedPoints[suspect] = 0; PlayerInfo[suspect][pZvezdi] =0; WantedLevel[suspect] = 0; PlayerInfo[suspect][pMestoJail] = 3; SetPlayerWantedLevel(suspect, 0); WantedPoints[suspect]--; } }//distance else { SendClientMessage(playerid, COLOR_GREY, "Ðÿäîì ñ âàìè íèêîãî íåò!"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, "Âû äàëåêî îò òþðüìû!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "Âû íå ÷ëåí Ïîëèöèè/Àðìèè/ÔÁÐ!"); return 1; } return 1;
Где здесь ошибка? И как сделать так, чтобы при убийстве игрока отправляло в тюрьму?
Редактировано Arslan_Safiullin - Воскресенье, 03 Фев 2013, 19:16:03