shape1
shape2
shape3
shape4
shape7
shape8

нужна помощь Green tech

  • Автор темы Удаленный пользователь 1418
  • Дата начала

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

Удаленный пользователь 1418

Гость
Гость
Помогите расширить в моде greentech кмд gpsavto

 
У

Удаленный пользователь 1418

Гость
Гость
Команду кинь свою.
Код:
//==============================================================================
	if(strcmp(cmd, "/gpsavto", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		new str[128],idcar = 0;
		if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "Èñïîëüçóéòå: /gps [¹ àâòî]");
		new nomer = strval(tmp);
		for(new cars = 1; cars < MAX_VEHICLES;cars++)
		{
			if(!strcmp(CarInfo[cars][cOwner],Names(playerid),true))
			{
				idcar++;
				if(nomer == idcar)
				{
					new Float:carx, Float:cary, Float:carz;
					GetVehiclePos(CarInfo[cars][cID],carx, cary, carz);
					SetPlayerCheckpoint(playerid, carx, cary, carz, 6.0);
					SetPVarInt(playerid,"gpscarid",1);
					SendClientMessage(playerid,-1,"Èíôîðìàöèÿ î ìåñòîíàõîæäåíèå ïîêàçàíà íà êàðòå êðàñíûì ìàÿ÷êîì");
					return true;
				}
				format(str,128,"¹ %d[id:%d] Ìîäåëü: %s(%d) Ãîñóäàðñòâåííûé íîìåð: %s",
				idcar,CarInfo[cars][cID],VehiclesName[CarInfo[cars][cMod]-400],CarInfo[cars][cMod],CarInfo[cars][cNumber]);
				SendClientMessage(playerid,-1,str);
				new mtext[20];
				new year, month;
				new days;
				getdate(year, month, days);
				if(month == 1) { mtext = "ßíâàðÿ"; }
				else if(month == 2) { mtext = "Ôåâðàëÿ"; }
				else if(month == 3) { mtext = "Ìàðòà"; }
				else if(month == 4) { mtext = "Àïðåëÿ"; }
				else if(month == 5) { mtext = "Ìàÿ"; }
				else if(month == 6) { mtext = "Èþíÿ"; }
				else if(month == 7) { mtext = "Èþëÿ"; }
				else if(month == 8) { mtext = "Àâãóñòà"; }
				else if(month == 9) { mtext = "Ñåíòÿáðÿ"; }
				else if(month == 10) { mtext = "Îêòÿáðÿ"; }
				else if(month == 11) { mtext = "Íîÿáðÿ"; }
				else if(month == 12) { mtext = "Äåêàáðÿ"; }
				new hour,minuite,second;
				gettime(hour,minuite,second);
				FixHour(hour);
				hour = shifthour;
				format(string, sizeof(string), "|%d %s|%d:%d|", days, mtext, hour, minuite);
				SendClientMessage(playerid,COLOR_YELLOW,string);
				return true;
			}
		}
		if(idcar == 0) return SendClientMessage(playerid,-1,"Ó âàñ íàâåðíî íåò àâòîìîáèëåé!");
		else return true;

	}
	//==============================================================================
 

MotoSport

Pawno-Crmp.Ru || Живи вечно!
Пользователь
08.03.2015
921
168
0
23
//==============================================================================
if(strcmp(cmd, "/gpsavto", true) == 0)
{
tmp = strtok(cmdtext, idx);
new str[128],idcar = 0;
if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "Èñïîëüçóéòå: /gps [¹ àâòî]");
new nomer = strval(tmp);
for(new cars = 1; cars < MAX_VEHICLES;cars++)
{
if(!strcmp(CarInfo[cars][cOwner],Names(playerid),true))
{
idcar++;
if(nomer == idcar)
{
new Float:carx, Float:cary, Float:carz;
GetVehiclePos(CarInfo[cars][cID],carx, cary, carz);
SetPlayerCheckpoint(playerid, carx, cary, carz, 6.0);
SetPVarInt(playerid,"gpscarid",1);
SendClientMessage(playerid,-1,"Èíôîðìàöèÿ î ìåñòîíàõîæäåíèå ïîêàçàíà íà êàðòå êðàñíûì ìàÿ÷êîì");
return true;
}
format(str,128,"¹ %d[id:%d] Ìîäåëü: %s(%d) Ãîñóäàðñòâåííûé íîìåð: %s",
idcar,CarInfo[cars][cID],VehiclesName[CarInfo[cars][cMod]-400],CarInfo[cars][cMod],CarInfo[cars][cNumber]);
SendClientMessage(playerid,-1,str);
new mtext[20];
new year, month;
new days;
getdate(year, month, days);
if(month == 1) { mtext = "ßíâàðÿ"; }
else if(month == 2) { mtext = "Ôåâðàëÿ"; }
else if(month == 3) { mtext = "Ìàðòà"; }
else if(month == 4) { mtext = "Àïðåëÿ"; }
else if(month == 5) { mtext = "Ìàÿ"; }
else if(month == 6) { mtext = "Èþíÿ"; }
else if(month == 7) { mtext = "Èþëÿ"; }
else if(month == 8) { mtext = "Àâãóñòà"; }
else if(month == 9) { mtext = "Ñåíòÿáðÿ"; }
else if(month == 10) { mtext = "Îêòÿáðÿ"; }
else if(month == 11) { mtext = "Íîÿáðÿ"; }
else if(month == 12) { mtext = "Äåêàáðÿ"; }
new hour,minuite,second;
gettime(hour,minuite,second);
FixHour(hour);
hour = shifthour;
format(string, sizeof(string), "|%d %s|%d:%d|", days, mtext, hour, minuite);
SendClientMessage(playerid,COLOR_YELLOW,string);
return true;
}
}
if(idcar == 0) return SendClientMessage(playerid,-1,"Ó âàñ íàâåðíî íåò àâòîìîáèëåé!");
else return true;

}
//==============================================================================
Когда копируешь русский язык делай

 

Kostyaev

Магистр
Пользователь
19.07.2014
1 123
274
0
26
В моде Green Tech уже имеется готовая команда:

if(strcmp(cmd, "/gpsavto", true) == 0)
{
tmp = strtok(cmdtext, idx);
new str[128],idcar = 0;
if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "Используйте: /gps [№ авто]");
new nomer = strval(tmp);
for(new cars = 1; cars < MAX_VEHICLES;cars++)
{
if(!strcmp(CarInfo[cars][cOwner],Names(playerid),true))
{
idcar++;
if(nomer == idcar)
{
new Float:carx, Float:cary, Float:carz;
GetVehiclePos(CarInfo[cars][cID],carx, cary, carz);
SetPlayerCheckpoint(playerid, carx, cary, carz, 6.0);
SetPVarInt(playerid,"gpscarid",1);
SendClientMessage(playerid,-1,"Информация о местонахождение показана на карте красным маячком");
return true;
}
format(str,128,"№ %d[id:%d] Модель: %s(%d) Государственный номер: %s",
idcar,CarInfo[cars][cID],VehiclesName[CarInfo[cars][cMod]-400],CarInfo[cars][cMod],CarInfo[cars][cNumber]);
SendClientMessage(playerid,-1,str);
new mtext[20];
new year, month;
new days;
getdate(year, month, days);
if(month == 1) { mtext = "Января"; }
else if(month == 2) { mtext = "Февраля"; }
else if(month == 3) { mtext = "Марта"; }
else if(month == 4) { mtext = "Апреля"; }
else if(month == 5) { mtext = "Мая"; }
else if(month == 6) { mtext = "Июня"; }
else if(month == 7) { mtext = "Июля"; }
else if(month == 8) { mtext = "Августа"; }
else if(month == 9) { mtext = "Сентября"; }
else if(month == 10) { mtext = "Октября"; }
else if(month == 11) { mtext = "Ноября"; }
else if(month == 12) { mtext = "Декабря"; }
new hour,minuite,second;
gettime(hour,minuite,second);
FixHour(hour);
hour = shifthour;
format(string, sizeof(string), "|%d %s|%d:%d|", days, mtext, hour, minuite);
SendClientMessage(playerid,COLOR_YELLOW,string);
return true;
}
}
if(idcar == 0) return SendClientMessage(playerid,-1,"У вас наверно нет автомобилей!");
else return true;

}

Как понять расширить?

 

Basis

chto tut doljno bit`!?
Пользователь
24.06.2014
824
1
271
0
25
В моде Green Tech уже имеется готовая команда:

if(strcmp(cmd, "/gpsavto", true) == 0)
{
tmp = strtok(cmdtext, idx);
new str[128],idcar = 0;
if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "Используйте: /gps [№ авто]");
new nomer = strval(tmp);
for(new cars = 1; cars < MAX_VEHICLES;cars++)
{
if(!strcmp(CarInfo[cars][cOwner],Names(playerid),true))
{
idcar++;
if(nomer == idcar)
{
new Float:carx, Float:cary, Float:carz;
GetVehiclePos(CarInfo[cars][cID],carx, cary, carz);
SetPlayerCheckpoint(playerid, carx, cary, carz, 6.0);
SetPVarInt(playerid,"gpscarid",1);
SendClientMessage(playerid,-1,"Информация о местонахождение показана на карте красным маячком");
return true;
}
format(str,128,"№ %d[id:%d] Модель: %s(%d) Государственный номер: %s",
idcar,CarInfo[cars][cID],VehiclesName[CarInfo[cars][cMod]-400],CarInfo[cars][cMod],CarInfo[cars][cNumber]);
SendClientMessage(playerid,-1,str);
new mtext[20];
new year, month;
new days;
getdate(year, month, days);
if(month == 1) { mtext = "Января"; }
else if(month == 2) { mtext = "Февраля"; }
else if(month == 3) { mtext = "Марта"; }
else if(month == 4) { mtext = "Апреля"; }
else if(month == 5) { mtext = "Мая"; }
else if(month == 6) { mtext = "Июня"; }
else if(month == 7) { mtext = "Июля"; }
else if(month == 8) { mtext = "Августа"; }
else if(month == 9) { mtext = "Сентября"; }
else if(month == 10) { mtext = "Октября"; }
else if(month == 11) { mtext = "Ноября"; }
else if(month == 12) { mtext = "Декабря"; }
new hour,minuite,second;
gettime(hour,minuite,second);
FixHour(hour);
hour = shifthour;
format(string, sizeof(string), "|%d %s|%d:%d|", days, mtext, hour, minuite);
SendClientMessage(playerid,COLOR_YELLOW,string);
return true;
}
}
if(idcar == 0) return SendClientMessage(playerid,-1,"У вас наверно нет автомобилей!");
else return true;

}

Как понять расширить?
я думаю чтобы искало больше личных авто

 

MotoSport

Pawno-Crmp.Ru || Живи вечно!
Пользователь
08.03.2015
921
168
0
23
В моде Green Tech уже имеется готовая команда:

if(strcmp(cmd, "/gpsavto", true) == 0)
{
tmp = strtok(cmdtext, idx);
new str[128],idcar = 0;
if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "Используйте: /gps [№ авто]");
new nomer = strval(tmp);
for(new cars = 1; cars < MAX_VEHICLES;cars++)
{
if(!strcmp(CarInfo[cars][cOwner],Names(playerid),true))
{
idcar++;
if(nomer == idcar)
{
new Float:carx, Float:cary, Float:carz;
GetVehiclePos(CarInfo[cars][cID],carx, cary, carz);
SetPlayerCheckpoint(playerid, carx, cary, carz, 6.0);
SetPVarInt(playerid,"gpscarid",1);
SendClientMessage(playerid,-1,"Информация о местонахождение показана на карте красным маячком");
return true;
}
format(str,128,"№ %d[id:%d] Модель: %s(%d) Государственный номер: %s",
idcar,CarInfo[cars][cID],VehiclesName[CarInfo[cars][cMod]-400],CarInfo[cars][cMod],CarInfo[cars][cNumber]);
SendClientMessage(playerid,-1,str);
new mtext[20];
new year, month;
new days;
getdate(year, month, days);
if(month == 1) { mtext = "Января"; }
else if(month == 2) { mtext = "Февраля"; }
else if(month == 3) { mtext = "Марта"; }
else if(month == 4) { mtext = "Апреля"; }
else if(month == 5) { mtext = "Мая"; }
else if(month == 6) { mtext = "Июня"; }
else if(month == 7) { mtext = "Июля"; }
else if(month == 8) { mtext = "Августа"; }
else if(month == 9) { mtext = "Сентября"; }
else if(month == 10) { mtext = "Октября"; }
else if(month == 11) { mtext = "Ноября"; }
else if(month == 12) { mtext = "Декабря"; }
new hour,minuite,second;
gettime(hour,minuite,second);
FixHour(hour);
hour = shifthour;
format(string, sizeof(string), "|%d %s|%d:%d|", days, mtext, hour, minuite);
SendClientMessage(playerid,COLOR_YELLOW,string);
return true;
}
}
if(idcar == 0) return SendClientMessage(playerid,-1,"У вас наверно нет автомобилей!");
else return true;

}

Как понять расширить?
Возможно он хочет что бы максимально было не 5 машин а больше. Но тут темой ошибся

 
A

Amfy

Гость
Гость
Команда по-моему, сколько есть машин, столько и ищет.

 
У

Удаленный пользователь 1418

Гость
Гость
помогите

 

Kostyaev

Магистр
Пользователь
19.07.2014
1 123
274
0
26
Вот попробуй:

Код:
if(strcmp(cmd, "/gpsavto", true) == 0){
   new str[128],idcar = 0;
   new poop = 0;
   new nomer = 0;
   if(PlayerInfo[playerid][pLeader] > 0)
   {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Используйте: /gpsavto [1 - поиск по авто во фраке или 0][id авто]");
poop = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "Используйте: /gpsavto [id авто]");
nomer = strval(tmp);
   }
   else
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "Используйте: /gpsavto [id авто]");
nomer = strval(tmp);
}
if(poop == 1)
{
for(new cars = 1; cars <= AllCars;cars++)
{
    if(CarInfo[cars][cBullbar] == PlayerInfo[playerid][pLeader])
{
   if(CarInfo[cars][cType] == 2)
{
idcar++;
if(nomer == idcar)
{
new Float:carx, Float:cary, Float:carz;
GetVehiclePos(CarInfo[cars][cID],carx, cary, carz);
SetPlayerCheckpoint(playerid, carx, cary, carz, 6.0);
SetPVarInt(playerid,"gpscarid",1);
SendClientMessage(playerid,-1,"Информация о местонахождение показана на карте красным маячком");
return 1;
}
format(str,128,"Машина: %d. Ид машины:%d Модель: %s Модель %d",
idcar,CarInfo[cars][cID],VehiclesName[CarInfo[cars][cMod]-400],CarInfo[cars][cMod]);
SendClientMessage(playerid,COLOR_YELLOW,str);
}
}
}
return 1;
}
for(new cars = 1; cars <= AllCars;cars++)
{
if(!strcmp(CarInfo[cars][cOwner],Name(playerid),true))
{
idcar++;
if(nomer == idcar)
{
new Float:carx, Float:cary, Float:carz;
GetVehiclePos(CarInfo[cars][cID],carx, cary, carz);
SetPlayerCheckpoint(playerid, carx, cary, carz, 6.0);
SetPVarInt(playerid,"gpscarid",1);
SendClientMessage(playerid,-1,"Информация о местонахождение показана на карте красным маячком");
return 1;
}
format(str,128,"Машина: %d. Ид машины:%d Модель: %s Гос.номер: %s",
idcar,CarInfo[cars][cID],VehiclesName[CarInfo[cars][cMod]-400],CarInfo[cars][cNumber]);
SendClientMessage(playerid,COLOR_YELLOW,str);
}
}
if(idcar == 0) return SendClientMessage(playerid,-1,"У вас наверно нет автомобилей!");
else return 1;


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