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

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

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

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

делаем /agetcar как на MyGame(т.к мод в паблик выложили)

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

denis32rus

Компетентный
Мод в паблике и уже все равно!!!

и так начнем
PHP:
1) к 3д текстам добавим
CreateDynamic3DTextLabel("{FF0000}[ {FF9000}Заказ авто{FF0000}]\n{FF9000}в пределах 45м. на парковочных местах.\n{FFFFFF}/agetcar",-1,2519.9109,2372.2134,4.2109,23.0);
PHP:
2)Ко всем командам добавим
CMD:agetcar(playerid, params[])
{
	if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
        if(GetPVarInt(playerid,"antiflood") > 0) return SendClientMessage(playerid, COLOR_RED, "{FF9000}Использование команды: {FFFFFF}раз в 10 сек.");
    	if (IsPlayerInRangeOfPoint(playerid,50.0,1545.0420, -1646.1550, 5.8977) || IsPlayerInRangeOfPoint(playerid,50.0,1555.6940, -1711.8550, 6.1981) || IsPlayerInRangeOfPoint(playerid,30.0,1600.2057, -1710.8408, 6.1981) || IsPlayerInRangeOfPoint(playerid,30.0,4140.1289, 51.2984, 16.2426))
		{
		    ShowDialog(playerid,362,2,"{3377ff}[L.S.P.D.] {FFFFFF}Выбор патрульного транспорта","{FF9000}*{FFFFFF}1+\n{FF9000}*{FFFFFF}4+\n{FF9000}*{FFFFFF}7+\n{FF9000}*{FFFFFF}11+\n{FF9000}*{FFFFFF}15+","Выбрать","Выход");
		}
	}
PHP:
case 362:
	{
        if(response)
		{
            new Float:X,Float:Y,Float:Z,carid;
            GetPlayerPos(playerid, X, Y, Z);
            new Float:A;GetPlayerFacingAngle(playerid,A);
            DestroyVehicle(GetPVarInt(playerid, "copautos"));
            if(listitem == 0) // Газеты -1719.8441,1349.7761,7.1911
			{
                if(PlayerInfo[playerid][pRank] >= 1)
                {
    	            carid = AddStaticVehicleEx(523,X, Y, Z, A,0,1,800);
    	            SetPVarInt(playerid, "copautos",carid);
	    	        Cars[GetPVarInt(playerid, "copautos")] = 1;
               		GetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
               		SetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
           		    PutPlayerInVehicle(playerid, GetPVarInt(playerid, "copautos"), 0);
           		    SetPVarInt(playerid,"antiflood",10);
           		}
           		else
           		{
           		    SendClientMessage(playerid, 0x00FF00AA, "{FF0000}[! ! !] {FFFFFF}Ваш ранг слишком мал для этого Авто."); //Grey colour
           		}
			}
			if(listitem == 1) // Газеты -1719.8441,1349.7761,7.1911
			{
	            if(PlayerInfo[playerid][pRank] >= 4)
                {
    	            carid = AddStaticVehicleEx(596,X, Y, Z, A,0,1,800);
    	            SetPVarInt(playerid, "copautos",carid);
	    	        Cars[GetPVarInt(playerid, "copautos")] = 1;
               		GetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
               		SetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
           		    PutPlayerInVehicle(playerid, GetPVarInt(playerid, "copautos"), 0);
           		    SetPVarInt(playerid,"antiflood",10);
           		}
           		else
           		{
           		    SendClientMessage(playerid, 0x00FF00AA, "{FF0000}[! ! !] {FFFFFF}Ваш ранг слишком мал для этого Авто."); //Grey colour
           		}
			}
			if(listitem == 2) // Газеты -1719.8441,1349.7761,7.1911
			{
	            if(PlayerInfo[playerid][pRank] >= 7)
                {
    	            carid = AddStaticVehicleEx(598,X, Y, Z, A,0,1,800);
    	            SetPVarInt(playerid, "copautos",carid);
	    	        Cars[GetPVarInt(playerid, "copautos")] = 1;
               		GetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
               		SetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
           		    PutPlayerInVehicle(playerid, GetPVarInt(playerid, "copautos"), 0);
           		    SetPVarInt(playerid,"antiflood",10);
           		}
           		else
           		{
           		    SendClientMessage(playerid, 0x00FF00AA, "{FF0000}[! ! !] {FFFFFF}Ваш ранг слишком мал для этого Авто."); //Grey colour
           		}
			}
			if(listitem == 3) // Газеты -1719.8441,1349.7761,7.1911
			{
	            if(PlayerInfo[playerid][pRank] >= 11)
                {
    	            carid = AddStaticVehicleEx(528,X, Y, Z, A,0,1,800);
    	            SetPVarInt(playerid, "copautos",carid);
	    	        Cars[GetPVarInt(playerid, "copautos")] = 1;
               		GetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
               		SetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
           		    PutPlayerInVehicle(playerid, GetPVarInt(playerid, "copautos"), 0);
           		    SetPVarInt(playerid,"antiflood",10);
           		}
           		else
           		{
           		    SendClientMessage(playerid, 0x00FF00AA, "{FF0000}[! ! !] {FFFFFF}Ваш ранг слишком мал для этого Авто."); //Grey colour
           		}
			}
			if(listitem == 4) // Газеты -1719.8441,1349.7761,7.1911
			{
	            if(PlayerInfo[playerid][pRank] >= 15)
                {
    	            carid = AddStaticVehicleEx(599,X, Y, Z, A,0,1,800);
    	            SetPVarInt(playerid, "copautos",carid);
	    	        Cars[GetPVarInt(playerid, "copautos")] = 1;
               		GetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
               		SetVehicleParamsEx(GetPVarInt(playerid, "copautos"),engine,lights,alarm,doors,bonnet,boot,objective);
           		    PutPlayerInVehicle(playerid, GetPVarInt(playerid, "copautos"), 0);
           		    SetPVarInt(playerid,"antiflood",10);
           		}
           		else
           		{
           		    SendClientMessage(playerid, 0x00FF00AA, "{FF0000}[! ! !] {FFFFFF}Ваш ранг слишком мал для этого Авто."); //Grey colour
           		}
			}
		}
	}
PHP:
В паблик public OnPlayerConnect(playerid)

SetPVarInt(playerid, "copautos",9999);

в паблик public OnPlayerDisconnect(playerid, reason)
	if(GetPVarInt(playerid, "copautos") != 0)
	{
	    DestroyVehicle(GetPVarInt(playerid, "copautos"));
	    Cars[GetPVarInt(playerid, "copautos")] = 0;
	}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу