Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

[Ошибки] 017, 033.

Статус
В этой теме нельзя размещать новые ответы.

CrazyHumster

Дебютант
Код:
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16265) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16265) : error 033: array must be indexed (variable "cmd")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16334) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16334) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16360) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16360) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16467) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16467) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16533) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16533) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16570) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16570) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16647) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16647) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16688) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16688) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16742) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16742) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16911) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(16911) : error 033: array must be indexed (variable "xxx")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(17002) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(17002) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(17024) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(17024) : error 033: array must be indexed (variable "tmp")
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(17063) : error 017: undefined symbol "strtok"
C:\Users\Nikita\Desktop\крмп сервера\урм\gamemodes\RP.pwn(17063) : error 033: array must be indexed (variable "tmp")

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
Помогите пожалуйста незнаю что делать...

Вот строки:
Код:
16265 cmd = strtok (cmdtext, idx);
16334 cmd = strtok (cmdtext, idx);
16360 tmp = strtok(cmdtext, idx);
16467 tmp = strtok(cmdtext, idx);
16533 tmp = strtok(cmdtext, idx);
16570 tmp = strtok(cmdtext, idx);
16647 tmp = strtok(cmdtext, idx);
16688 tmp = strtok(cmdtext, idx);
16742 tmp = strtok(cmdtext, idx);
16911 xxx = strtok(cmdtext, idx);
17002 tmp = strtok(cmdtext, idx);
17024 tmp = strtok(cmdtext, idx);
17063 tmp = strtok(cmdtext, idx);
И вот с 16251-17097(на всяк случай):
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  	 new string[256];
 	 new playermoney;
	 new sendername[MAX_PLAYER_NAME];
	 new giveplayer[MAX_PLAYER_NAME];
	 new tmp[256];
	 new cmd[256];
	 new moneys, idx;
	 new idcar = GetPlayerVehicleID(playerid);
	 new animationplayed;
	 new xxx [256];
	 new mammount;
	 new specplayerid, specvehicleid;
	 cmd = strtok (cmdtext, idx);

	if (strcmp(cmd, "/richlist", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 1)

	        {
	            SendClientMessage(playerid, COLOR_GREY, "Вы не админ!");
	            return 1;
	        }
			format(string, sizeof(string), "%s проверил богатых пользователей онлайн.", sendername);
			ABroadCast(COLOR_LIGHTRED, string, 5);
			SendClientMessage(playerid, COLOR_GREEN, "Богачи онлайн:");
			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 Проверка богачей...",d,m,y,h,mi,s,sendername);

			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i) && !IsPlayerNPC(i))
				{
				    if(GetPlayerMoney(i) >= 1 || PlayerInfo[i][pAccount] >= 1)
				    {
				        GetPlayerName(i, sendername, sizeof(sendername));
						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						format(string, 256, "%s (%d) - На руках: %dр | В банке: $%d", sendername, i, GetPlayerMoney(i), PlayerInfo[i][pAccount]);
						SendClientMessage(playerid, COLOR_YELLOW, string);
					}
				}
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/respawnallcars", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 3)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "(( У вас недостаточно прав на использование этой команды ))");
			    return 1;
			}
			new bool:unwanted[CAR_AMOUNT];
			for(new player=0; player<MAX_PLAYERS; player++)
     		{
            	if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
     		}
			for(new car = 1; car <= 1300; car++)
			{
				if(!unwanted[car]) SetVehicleToRespawn(car);
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "Зареспавнил все машины %s.", sendername);
			BroadCast(COLOR_WHITE,string);
		}
		return 1;
	}
	 ///CREATEOBJECT
if(strcmp(cmd, "/co", true) == 0)
	{

	if(PlayerInfo[playerid][pAdmin]<=1338){
    SendClientMessage(playerid, COLOR_GREY, "Вы не админ");
    return 1;
	}
	tmp = strtok(cmdtext,idx);
	if(!strlen(tmp))
	{
	SendClientMessage(playerid, COLOR_GRAD1, "Используйте /co [ID объекта]");
	return 1;
    }
    if(totalo+1==OBJECTS)
    {
    SendClientMessage(playerid, COLOR_GREY, "Слишком много объектов, удалите старые...");
    return 1;
    }
    totalo=totalo+1;
    new Float:xS,Float:yS,Float:zS;
    GetPlayerPos(playerid,xS,yS,zS);
    object[totalo][oID] = CreateObject(strval(tmp),xS,(yS+2.0),zS,0.0,0.0,0.0,300.0);
    return 1;
   }

   ///CREATEOBJECT

if(strcmp(cmd, "/x", true) == 0)
	{
	if(PlayerInfo[playerid][pAdmin]<=1338){
    SendClientMessage(playerid, COLOR_GREY, "Вы не админ");
    return 1;
	}
	tmp = strtok(cmdtext,idx);
	if(!strlen(tmp))
	{
	SendClientMessage(playerid, COLOR_GRAD1, "Используйте /x [0,1]");
	return 1;
    }
    new Float:x1,Float:y1,Float:z1;
    for(new i=0;i<OBJECTS;i++)
    {
    if(IsValidObject(object[i][oID]))
    {
    GetObjectPos(object[i][oID],x1,y1,z1);
    if(IsPlayerInRangeOfPoint(playerid,2.0,x1,y1,z1))
    {
    if(strval(tmp)==0) { SetObjectPos(object[i][oID],(x1-0.1),y1,z1); }
    if(strval(tmp)==1) { SetObjectPos(object[i][oID],(x1+0.1),y1,z1); }
    }
    }
    }
    return 1;
   }

///ROADCLOSE/OPEN
if(strcmp(cmd, "/perehvat", true) ==0)
{
if(!(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1))
if(!(PlayerInfo[playerid][pMember]==6||PlayerInfo[playerid][pLeader]==6))
{
SendClientMessage(playerid, COLOR_GREY, "Вы не можете использовать эту команду!");
return 1;
}
if(PlayerInfo[playerid][pRank]<9)
{
SendClientMessage(playerid, COLOR_GREY, "Вы должны быть 9 ранга, что бы использовать эту команду!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(ServerRoadClosed==0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы объявили план перехват");
SendClientMessageToAll(COLOR_WHITE, "|_______________ План перехват ______________|");
format(string, sizeof(string), "Объявлен план перехват! Все мосты перекрыты! План объявил: %s", sendername);
SendClientMessageToAll(COLOR_NEWSF,string);
ServerRoadClosed=1;
return 1;
}
if(ServerRoadClosed==1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы отменили план перехват");
SendClientMessageToAll(COLOR_WHITE, "|_______________ План перехват ______________|");
format(string, sizeof(string), "План перехват отменен! Все мосты открыты! План отменил: %s", sendername);
SendClientMessageToAll(COLOR_NEWSF,string);
ServerRoadClosed=0;
return 1;
}
SendClientMessage(playerid, COLOR_GREY, "Произошла ошибка");
return 1;
}
///проезд
if(strcmp(cmd, "/проезд", true) == 0)
	{
	if(ServerRoadClosed==0)
	{
	GetPlayerName(playerid, sendername, sizeof(sendername));
		if(IsPlayerInRangeOfPoint(playerid,5.0,2740.9590,-1016.5298,23.7023))  //IZ UZHNOOGO
		{
		new summa;
		summa=50;
		SetObjectRot(shlak2,0.0,0.0,0.0);
		format(string, sizeof(string), "* %s оплатил проезд", sendername);
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		GivePlayerMoney(playerid,-summa);
        PlayerInfo[playerid][pCash]-=summa;
		Treasury+=summa;
		timershlak2 = SetTimer("ShlakTimer2",5000,false);
		return 1;
		}
		if(IsPlayerInRangeOfPoint(playerid,5.0,2754.1904,-1029.3065,23.5559)) //V UZHNIY
		{
		new summa;
		summa = 50;
		SetObjectRot(shlak1,0.0,0.0,0.0);
		format(string, sizeof(string), "* %s оплатил проезд", sendername);
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		GivePlayerMoney(playerid,-summa);
		PlayerInfo[playerid][pCash]-=summa;
		Treasury+=summa;
		timershlak1 = SetTimer("ShlakTimer1",5000,false);
		return 1;
		}
		SendClientMessage(playerid, COLOR_GREY, "Вы не рядом с постом!");
		return 1;
		}
		else
		{
		SendClientMessage(playerid, COLOR_RED, "Объявлен план перехват! Проезд закрыт!");
		return 1;
		}
	}
///SETHOUSESELL
if(strcmp(cmd, "/sethsale", true) == 0)
	{
	if(PlayerInfo[playerid][pAdmin]<13)
	{
SendClientMessage(playerid, COLOR_WHITE, "У вас нет прав для использования этой команды");
return 1;
}
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте /sethsale [0 или 1]");
					return 1;
				}
				new level;
				level = strval(tmp);
				if(level>1||level<0)
				{
				SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте /sethsale [0 или 1]");
				return 1;
				}
	for(new i=1;i<MAX_HOUSE;i++)
	{
	if(IsPlayerInRangeOfPoint(playerid,4.0,House[i][HOx],House[i][HOy],House[i][HOz]))
	{
	House[i][sale]=level;
DestroyPickup(HPick[i]);
if(House[i][sale]==1)
{
HPick[i] = CreatePickup(1239,2,House[i][HOx],House[i][HOy],House[i][HOz]);
}
else
{
HPick[i] = CreatePickup(1273,2,House[i][HOx],House[i][HOy],House[i][HOz]);
}
OnNewHouseUpdate(i);
return 1;
	}
	}
	}


///Арендаторы

if(strcmp(cmd,"/арендаторы",true)==0)
{
if(!(PlayerInfo[playerid][pNewHouse]>0))
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не владелец дома!");
return 1;
}
SendClientMessage(playerid,COLOR_GRAD1,"_________________Список игроков, арендующих ваш дом(ОНЛАЙН)_________________");
for(new i=0; i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)&&gPlayerLogged[i]==1)
{
if(PlayerInfo[playerid][pNewHouse]==PlayerInfo[i][pRentHouse])
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string,sizeof(string),"%s",giveplayer);
SendClientMessage(playerid,COLOR_GRAD1,string);
}
}
}
SendClientMessage(playerid,COLOR_GRAD1,"_____________________________________________________________________________________");
return 1;
}

if(strcmp(cmd,"/копилка",true)==0)
{
if(!(PlayerInfo[playerid][pNewHouse]>0))
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не владелец дома!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
format(string,sizeof(string),"Используйте /копилка [Сумма], чтобы взять деньги из дома. Доступно: %d рублей",House[PlayerInfo[playerid][pNewHouse]][HBank]);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
new typer;
typer=strval(tmp);
if(typer<1||typer>House[PlayerInfo[playerid][pNewHouse]][HBank])
{
format(string,sizeof(string),"Вы можете взять от 1 до %d рублей",House[PlayerInfo[playerid][pNewHouse]][HBank]);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
House[PlayerInfo[playerid][pNewHouse]][HBank]-=typer;
OnNewHouseUpdate(PlayerInfo[playerid][pNewHouse]);
format(string,sizeof(string),"Вы взяли из дома %d рублей. Осталось: %d рублей.",typer,House[PlayerInfo[playerid][pNewHouse]][HBank]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pCash]+=typer;
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
GivePlayerMoney(playerid,typer);
SavePlayer(playerid);
return 1;
}

if(strcmp(cmd,"/изм",true)==0)
{
if(PlayerInfo[playerid][pPasport]==0)
{
SendClientMessage(playerid, COLOR_GREY, "У вас нет паспорта! Получите его в паспортном столе!");
return 1;
}
if(!(PlayerInfo[playerid][pNewHouse]>0))
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не владелец дома!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_GRAD1, "_______________________________________________________________________________________________________________");
SendClientMessage(playerid, COLOR_GRAD1, "Используйте /изм [ID Машины (Из списка ниже)]");
SendClientMessage(playerid, COLOR_GRAD1, "BMW X5(1) - 4 миллиона. Opel Omega(2) - 2 миллиона. Лада Калина(3) - 500 тысяч");
SendClientMessage(playerid, COLOR_GRAD1, "УАЗ Буханка(4) - 300 тысяч. Toyota MARK II(5) - 2 миллиона. BMW 535i(6) - 2 миллиона");
SendClientMessage(playerid, COLOR_GRAD1, "Mitsubishi Pajero(7) - 2 миллиона. Нива Шевроле(8) - 500 тысяч. ВАЗ 21099(9) - 300 тысяч.");
SendClientMessage(playerid, COLOR_GRAD1, "ГАЗ 3110(10) - 300 тысяч. ВАЗ 2121(11) - 300 тысяч.");
SendClientMessage(playerid, COLOR_GRAD1, "_______________________________________________________________________________________________________________");
return 1;
}
new typer;
typer=strval(tmp);
if(typer<1||typer>11)
{
SendClientMessage(playerid, COLOR_GRAD1, "_______________________________________________________________________________________________________________");
SendClientMessage(playerid, COLOR_GRAD1, "Используйте /изм [ID Машины (Из списка ниже)]");
SendClientMessage(playerid, COLOR_GRAD1, "BMW X5(1) - 4 миллиона. Opel Omega(2) - 2 миллиона. Лада Калина(3) - 700 тысяч");
SendClientMessage(playerid, COLOR_GRAD1, "УАЗ Буханка(4) - 300 тысяч. Toyota MARK II(5) - 2 миллиона. BMW 535i(6) - 2 миллиона");
SendClientMessage(playerid, COLOR_GRAD1, "Mitsubishi Pajero(7) - 2 миллиона. Нива Шевроле(8) - 500 тысяч. ВАЗ 21099(9) - 300 тысяч.");
SendClientMessage(playerid, COLOR_GRAD1, "ГАЗ 3110(10) - 300 тысяч. ВАЗ 2121(11) - 300 тысяч.");
SendClientMessage(playerid, COLOR_GRAD1, "_______________________________________________________________________________________________________________");
return 1;
}
new idcarnew,summacarnew,carname[128];
idcarnew=0;
switch(typer)
{
case 1: idcarnew = 400, summacarnew = 4000000, carname="BMW X5";
case 2: idcarnew = 402, summacarnew = 2000000, carname="Opel Omega";
case 3: idcarnew = 411, summacarnew = 700000, carname="Лада Калина";
case 4: idcarnew = 422, summacarnew = 300000, carname="УАЗ Буханка";
case 5: idcarnew = 436, summacarnew = 2000000, carname="Toyota MARK II";
case 6: idcarnew = 466, summacarnew = 2000000, carname="BMW 535i";
case 7: idcarnew = 475, summacarnew = 2000000, carname="Mitsubishi Pajero";
case 8: idcarnew = 489, summacarnew = 500000, carname="Нива Шевроле";
case 9: idcarnew = 516, summacarnew = 300000, carname="ВАЗ 21099";
case 10: idcarnew = 551, summacarnew = 300000, carname="ГАЗ 3110";
case 11: idcarnew = 542, summacarnew = 300000, carname="ВАЗ 2121";
}
if(idcarnew==0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Ошибка! Попробуйте ещё раз!");
return 1;
}
if(PlayerInfo[playerid][pCash]<summacarnew)
{
SendClientMessage(playerid, COLOR_GRAD1, "У вас недостаточно денег!");
return 1;
}
new caridh;
caridh=PlayerInfo[playerid][pNewHouse];
if(idcarnew==HCar[caridh][modelC])
{
SendClientMessage(playerid, COLOR_GRAD1, "У вас уже эта машина!");
return 1;
}
HCar[caridh][modelC]=idcarnew;
OnNewHouseUpdate(caridh);
DestroyVehicle(HCar[caridh][idC]);
HCar[caridh][idC] = CreateVehicle(HCar[caridh][modelC],HCar[caridh][CAHx],HCar[caridh][CAHy],HCar[caridh][CAHz],HCar[caridh][rotat],HCar[caridh][colorC],HCar[caridh][color1C],600);
PlayerInfo[playerid][pCash]-=summacarnew;
GivePlayerMoney(playerid,-summacarnew);
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
format(string,sizeof(string),"Поздравляем! Вы поменяли машину на %s за %d рублей",carname,summacarnew);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SavePlayer(playerid);
return 1;
}

if(strcmp(cmd,"/цв",true)==0)
{
if(!(PlayerInfo[playerid][pNewHouse]>0))
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не владелец дома!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте /цв [0-129] [0-129]");
return 1;
}
new typer1;
new typer2;
typer1=strval(tmp);
typer2=strval(tmp);
if(typer1<0||typer1>129&&typer2<0||typer2>129)
{
SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте /цв [0-129] [0-129]");
return 1;
}
if(PlayerInfo[playerid][pCash]<20000)
{
SendClientMessage(playerid, COLOR_GRAD1, "У вас недостаточно денег!");
return 1;
}
new caridh;
caridh=PlayerInfo[playerid][pNewHouse];
HCar[caridh][colorC]=typer1;
HCar[caridh][color1C]=typer2;
OnNewHouseUpdate(caridh);
DestroyVehicle(HCar[caridh][idC]);
HCar[caridh][idC] = CreateVehicle(HCar[caridh][modelC],HCar[caridh][CAHx],HCar[caridh][CAHy],HCar[caridh][CAHz],HCar[caridh][rotat],HCar[caridh][colorC],HCar[caridh][color1C],600);
PlayerInfo[playerid][pCash]-=20000;
GivePlayerMoney(playerid,-20000);
PlayerPlaySound(playerid,1052,0.0,0.0,0.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы сменили цвет машины за 20000 рублей!");
SavePlayer(playerid);
return 1;
}
	
if(strcmp(cmd,"/стоимость",true)==0)
{
if(!(PlayerInfo[playerid][pNewHouse]>0))
{
SendClientMessage(playerid, COLOR_GRAD1, "У вас нет дома!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте /стоимость [аренды]");
return 1;
}
new typer;
typer=strval(tmp);
if(typer<1||typer>25000)
{
SendClientMessage(playerid, COLOR_GRAD1, "Стоимость аренды не может быть меньше 1 и больше 25000 рублей");
return 1;
}
House[PlayerInfo[playerid][pNewHouse]][rentsumma]=typer;
format(string,sizeof(string),"Вы установили стоимость аренды на %d рублей в час",typer);
SendClientMessage(playerid, COLOR_GRAD1, string);
OnNewHouseUpdate(PlayerInfo[playerid][pNewHouse]);
return 1;
}

if(strcmp(cmd, "/дом", true) == 0)
{
if(PlayerInfo[playerid][pNewHouse]==0&&PlayerInfo[playerid][pRentHouse]==0)
{
SendClientMessage(playerid, COLOR_GRAD2, "У вас нету дома!");
return 1;
}
if(nowhouse[playerid]<1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Вы не в доме!");
return 1;
}
new houseid;
if(PlayerInfo[playerid][pNewHouse]>0) { houseid=PlayerInfo[playerid][pNewHouse]; }
if(PlayerInfo[playerid][pRentHouse]>0) { houseid=PlayerInfo[playerid][pRentHouse]; }

if(House[houseid][lock]==0) {
House[houseid][lock]=1;
OnNewHouseUpdate(houseid);
SendClientMessage(playerid,COLOR_GRAD1,"Вы закрыли дом"); }
else
{
House[houseid][lock]=0;
OnNewHouseUpdate(houseid);
SendClientMessage(playerid,COLOR_GRAD1,"Вы открыли дом"); }
return 1;
}

if(strcmp(cmd,"/аренда",true)==0)
{
if(!(PlayerInfo[playerid][pNewHouse]>0))
{
SendClientMessage(playerid, COLOR_GRAD1, "У вас нет дома/квартиры!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте /аренда [0 - Запретить, 1 - Разрешить]");
return 1;
}
new typer;
typer=strval(tmp);
if(typer<0||typer>1)
{
SendClientMessage(playerid, COLOR_ISPOLZUY, "Используйте /аренда [0 - Запретить, 1 - Разрешить]");
return 1;
}
if(typer==0)
{
House[PlayerInfo[playerid][pNewHouse]][rentable]=0;
SendClientMessage(playerid, COLOR_GRAD1, "Вы запретили аренду");
OnNewHouseUpdate(PlayerInfo[playerid][pNewHouse]);
return 1;
}
if(typer==1)
{
House[PlayerInfo[playerid][pNewHouse]][rentable]=1;
SendClientMessage(playerid, COLOR_GRAD1, "Вы разрешили аренду");
OnNewHouseUpdate(PlayerInfo[playerid][pNewHouse]);
return 1;
}
return 1;
}

//------------------------------------------------------------------------------
 if(!strcmp(cmdtext, "/startsweep", true))
    {
		if(IsPlayerConnected(playerid))
		{
		    if(PlayerInfo[playerid][pJob] != 21)
		    {
		        SendClientMessage(playerid, COLOR_RED, "Вы не работаете мойщиком улиц!");
		        return 1;
		    }
		    if(PlayerIsSweeping[playerid] == 1)
		    {
		        SendClientMessage(playerid, COLOR_RED, "Вы уже рабоатете");
		        return 1;
		    }
		    if(IsASweeper(idcar))
		    {
		        PlayerIsSweeping[playerid] = 1;
		        TogglePlayerControllable(playerid, 1);
		        new randomize;
		        randomize = random(sizeof(gSweeperPoints));
		        SetPlayerCheckpoint(playerid, gSweeperPoints[randomize][0], gSweeperPoints[randomize][1], gSweeperPoints[randomize][2], 5.0);
		        SendClientMessage(playerid, COLOR_WHITE, "Шеф: Bремя пошло, работаем, работаем, работаем.");
		    }
		}
		return 1;
    }
//==============================================================================
    if(!strcmp(cmdtext, "/stopsweep", true))
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerIsSweeping[playerid] == 1)
            {
                DisablePlayerCheckpoint(playerid);
                PlayerIsSweeping[playerid] = 0;
                SendClientMessage(playerid, COLOR_WHITE, " Вы закончили работу ");
                if(IsASweeper(idcar))
                {
                    RemovePlayerFromVehicle(playerid);
                }
            }
            else
            {
				SendClientMessage(playerid, COLOR_RED, "Вы не работаете ");
				return 1;
            }
        }
        return 1;
    }
//===================================КОЛХОЗНИКИ=================================
	if(!strcmp(cmdtext, "/startharvest", true))
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(!IsAHarvest(idcar))
			{
			    SendClientMessage(playerid, COLOR_RED, "Вы не на ферме ");
			    return 1;
			}
			if(FarmerVar[playerid] == 1)
			{
			    SendClientMessage(playerid, COLOR_RED, "Вы уже работаете ");
			    return 1;
			}
			if(FarmerPickup[playerid][0] >= 22)
			{
			    SendClientMessage(playerid, COLOR_WHITE, " Заработанная сумма прибавится к зарплате ");
			    return 1;
			}
	        if(PlayerInfo[playerid][pJob] == 19)
	        {
	            JustStarted[playerid] = 1;
	            FarmerVar[playerid] = 1;
	            TogglePlayerControllable(playerid, 1);
	            OnPlayerEnterCheckpoint(playerid);
	            SendClientMessage(playerid, COLOR_YELLOW, "Фермер: Твоя задача ездить на комбайне по полю и косить урожай.");
	        }
	    }
	    return 1;
	}
//==============================================================================
	if(!strcmp(cmdtext, "/stopharvest", true))
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(FarmerVar[playerid] == 0)
			{
			    SendClientMessage(playerid, COLOR_RED, "Вы не начинали работать ");
			    return 1;
			}
			if(PlayerInfo[playerid][pJob] == 19)
			{
			    if(IsAHarvest(idcar))
			    {
			        TogglePlayerControllable(playerid, 1);
			        RemovePlayerFromVehicle(playerid);
			    }
			    if(FarmerPickup[playerid][0] >= 1 && FarmerPickup[playerid][0] <= 22)
				{
					FarmerPickup[playerid][0]--;
				}
				JustStarted[playerid] = 0;
			    FarmerVar[playerid] = 0;
			    DisablePlayerCheckpoint(playerid);
			}
	    }
	    return 1;
	}
//==============================================================================
if(strcmp(cmdtext, "/animhelp", true) == 0)
{
SendClientMessage(playerid, COLOR_GREEN," /animped - Анимации пешеходов./танец - Анимация Танцев./руки - Поднять руки вверх");
SendClientMessage(playerid, COLOR_GREEN," Остальные анимации: /animairport /animat /animbar /animball /animfire /animbeach");
SendClientMessage(playerid, COLOR_GREEN," /animbp /animinf /animbiked /animbh /animfood /animbikelp /animms /animbikes /animcar");
SendClientMessage(playerid, COLOR_GREEN," /animbikev /animbmx /animbikedbz /animchase /animbox /animbomber /animbsp /animcamera ");
SendClientMessage(playerid, COLOR_GREEN," /animgym /animpara /animgangs /animlookers /animcarchat /animcasino /animbuddy /animbus");
SendClientMessage(playerid, COLOR_GREEN," /animcarry /animintshop /animjst /animkart /animkissing /animknife /animlapdan /animdend");
SendClientMessage(playerid, COLOR_GREEN," /animmedic /animmtb /animmusc /animotb /animpark /animsaw /animchoppa");
SendClientMessage(playerid, COLOR_GREEN," /animclothes /animcoach /animcolt /animcopa /animcod /animcrack");
SendClientMessage(playerid, COLOR_GREEN," /animhelp2 - Вторая Часть Команд Анимаций.");
return 1;
}
//------------------------------------------------------------------------------
if(strcmp(cmdtext, "/animhelp2", true) == 0)
{
SendClientMessage(playerid, COLOR_GREEN,"Вторая Часть Команд Анимаций:");
SendClientMessage(playerid, COLOR_GREEN," /animcrib /animdealer /animdildo /animdozer  /animdrivebys /animfat");
SendClientMessage(playerid, COLOR_GREEN," /animfightb /animfightc /animfightd /animfighte /animfinale /animfinale2 /animflamef");
SendClientMessage(playerid, COLOR_GREEN," /animflowers /animghands /animfw /animghetto /animgog /animgraffity /animgreya /animgren");
SendClientMessage(playerid, COLOR_GREEN," /animhaircut /animheist  /animinthouse /animintoffice /animplayerdbf /animplayidles /animpolice");
SendClientMessage(playerid, COLOR_GREEN," /animpool /animpoor /animpython /animquad /animquadbz /animrapping  /animrifle /animriot /animrobbank ");
SendClientMessage(playerid, COLOR_GREEN," /animrocket /animrustler /animryder /animscrat /animshamal /animshop /animskate /animshotgun");
SendClientMessage(playerid, COLOR_GREEN," /animvortex /animtec /animtrain /animsil /animtattoo  /animsmoking /animsniper /animspray /animstrip");
SendClientMessage(playerid, COLOR_GREEN," /animbath /animsweet /animswim /animsword /animtank /animtruck /animuzi  /animvan /animvending");
SendClientMessage(playerid, COLOR_GREEN," /animway /animweap");
return 1;
}
//==============================================================================
   	if(strcmp(cmd, "/курить", true) == 0) {
        xxx = strtok(cmdtext, idx);
        animationplayed = strval(xxx);
		if(animationplayed < 1 || animationplayed > 2)
		{
			SendClientMessage(playerid,COLOR_ISPOLZUY,"Используйте /курить [1-2]");
			return 1;
		}
		if(PlayerInfo[playerid][pSigs] <= 0)
		{
		    SendClientMessage(playerid,COLOR_GREY," У вас нет сигарет. Вы можете купить их в магазине г. Южного.");
			return 1;
  		}
        if(animationplayed == 1) {
        ApplyAnimation(playerid,"SMOKING", "M_smklean_loop",4.1,1,1,1,1,1);
        }else if(animationplayed == 2) {
        ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop",4.1,1,1,1,1,1);
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
		format(string, sizeof(string), "* %s курит", sendername);
		ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		PlayerInfo[playerid][pSigs]--;
        return 1;
    }
//------------------------------------------------------------------------------
   	if(strcmp(cmd, "/руки", true) == 0)
	{
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
		{
		    if(PlayerCuffed[playerid] == 0 && PlayerTied[playerid] == 0 && KnockedDown[playerid] == 0)
		    {
			    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
			    GetPlayerName(playerid, sendername, sizeof(sendername));
			    format(string, sizeof(string), "* %s поднимает руки вверх", sendername);
		ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	  	  		return 1;
			}
		}
	}
//---------------------------------[Стили Боя]----------------------------------
   if (strcmp(cmdtext, "/стиль", true) == 0)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы изменили стиль боя на 'Normal'");
        return 1;
    }
    if (strcmp(cmdtext, "/s2", true) == 0)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы изменили стиль боя на 'Boxing'");
        return 1;
    }
    if (strcmp(cmdtext, "/s3", true) == 0)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы изменили стиль боя на 'kungfu'");
        return 1;
    }
    if (strcmp(cmdtext, "/s4", true) == 0)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы изменили стиль боя на 'keenhead'");
        return 1;
    }
    if (strcmp(cmdtext, "/s5", true) == 0)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы изменили стиль боя на 'grabkick'");
        return 1;
    }
    if (strcmp(cmdtext, "/s6", true) == 0)
    {
        SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы изменили стиль боя на 'elbow'");
        return 1;
    }
//------------------------------------------------------------------------------
	if(strcmp(cmd, "/ссать", true) == 0)
	{
		SetPlayerSpecialAction(playerid,68);
		return 1;
	}
//------------------------------------------------------------------------------
	if(strcmp(cmd, "/курить", true) == 0)
	{
		SetPlayerSpecialAction(playerid,21);
		return 1;
	}
//------------------------------------------------------------------------------
if(strcmp(cmd, "/танец", true) == 0) {
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_ISPOLZUY ,"Используйте: /танец [1-3]");
return 1;
}
animationplayed = strval(tmp);
if(animationplayed < 1 || animationplayed > 3) {
SendClientMessage(playerid,COLOR_ISPOLZUY ,"Используйте: /танец [1-3]");
return 1;
}
if(animationplayed == 1) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
} else if(animationplayed == 2) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
} else if(animationplayed == 3) {
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
}
return 1;
}
}
//------------------------------------------------------------------------------
if(strcmp(cmd, "/animbar", true) == 0) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_ISPOLZUY ,"Используйте: /animbar [1-12]");
return 1;
}
animationplayed = strval(tmp);
if(animationplayed < 1 || animationplayed > 12) {
SendClientMessage(playerid,COLOR_ISPOLZUY ,"Используйте: /animbar [1-12]");
return 1;
}
if(animationplayed == 1) {
ApplyAnimation(playerid,"BAR","Barcustom_get",4.1,0,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BAR","Barcustom_loop",4.1,0,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BAR","Barcustom_order",4.1,0,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BAR","Barserve_bottle",4.1,0,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BAR","Barserve_give",4.1,0,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BAR","Barserve_glass",4.1,0,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BAR","Barserve_in",4.1,0,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BAR","Barserve_loop",4.1,0,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BAR","Barserve_order",4.1,0,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BAR","dnk_stndF_loop",4.1,0,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BAR","dnk_stndM_loop",4.1,0,1,1,1,1);
} else if(animationplayed == 12) {
ApplyAnimation(playerid,"BAR","BARman_idle",4.1,0,1,1,1,1);
}
return 1;
}
//------------------------------------------------------------------------------
if(strcmp(cmd, "/animball", true) == 0) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_ISPOLZUY,"Используйте: /animball [1-11]");
return 1;
}
animationplayed = strval(tmp);
if(animationplayed < 1 || animationplayed > 11) {
SendClientMessage(playerid,COLOR_ISPOLZUY,"Используйте: /animball [1-11]");
return 1;
}
if(animationplayed == 1) {
ApplyAnimation(playerid,"BASEBALL","Bat_1",4.1,0,1,1,1,1);
} else if(animationplayed == 2) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1);
} else if(animationplayed == 3) {
ApplyAnimation(playerid,"BASEBALL","Bat_2",4.1,0,1,1,1,1);
} else if(animationplayed == 4) {
ApplyAnimation(playerid,"BASEBALL","Bat_4",4.1,0,1,1,1,1);
} else if(animationplayed == 5) {
ApplyAnimation(playerid,"BASEBALL","Bat_block",4.1,0,1,1,1,1);
} else if(animationplayed == 6) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_1",4.1,0,1,1,1,1);
} else if(animationplayed == 7) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_2",4.1,0,1,1,1,1);
} else if(animationplayed == 8) {
ApplyAnimation(playerid,"BASEBALL","Bat_Hit_3",4.1,0,1,1,1,1);
} else if(animationplayed == 9) {
ApplyAnimation(playerid,"BASEBALL","Bat_IDLE",4.1,0,1,1,1,1);
} else if(animationplayed == 10) {
ApplyAnimation(playerid,"BASEBALL","Bat_M",4.1,0,1,1,1,1);
} else if(animationplayed == 11) {
ApplyAnimation(playerid,"BASEBALL","BAT_PART",4.1,0,1,1,1,1);
}
return 1;
}
Добавьте в скайп если не сложно golden_tiger92
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу