Sign in to follow this  
Followers 0
Drummer1993

Тюннинг на авто

2 posts in this topic

Здравствуйте, хочу представить вам маленькую радость для ваших игроков (на скрине будет все понято что за радость) буду дополнять объектами (доп. бамперы  мигалки, и т.к ) всем удачи !
работает только на авто id 411, 541 , 451 , 415
Автор: Неизвестный

Спойлер

}
CMD:newtunning(playerid, params[])
{
    if(GetPlayerState(playerid)!=2) return SendClientMessage(playerid, -1, "Вы не в машине");
    ShowPlayerDialogEx(playerid, 9934, DIALOG_STYLE_LIST, "{FFFFFF}Выберите устанавливаемый тюнинг. Цена-{248daa}10000$", "{FFFFFF}1. Двигатель\n{FFFFFF}2. Мигалка\n{FFFFFF}3. Спойлер", "Выбрать", "Отмена");
	return 1;
Спойлер


}
	case 9934:
	    {
			new tunningupdate;
			new vehicleid = GetPlayerVehicleID(playerid);
	        if(response)
			{
			    switch(listitem)
			    {
					case 0:
					{
					    //Двигатель
					    switch(GetVehicleModel(vehicleid))
					    {
					        case 411:
					        {
								if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
					            tunningupdate = CreateDynamicObject(19917,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, 1.841, -0.270, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Двигатель успешно установлен!");
    							GiveMoney(playerid,-10000);
					        }
					        case 541:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
					            tunningupdate = CreateDynamicObject(19917,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, 1.591, -0.260, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Двигатель успешно установлен!");
    							GiveMoney(playerid,-10000);
					        }
					        case 451:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
					            tunningupdate = CreateDynamicObject(19917,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, 1.741, -0.340, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Двигатель успешно установлен!");
    							GiveMoney(playerid,-10000);
					        }
							case 415:
							{
							    if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
							    tunningupdate = CreateDynamicObject(19917,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, 1.670, -0.360, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Двигатель успешно установлен!");
    							GiveMoney(playerid,-10000);
							}
					    }
					}
	 				case 1:
	 				{
	 				    switch(GetVehicleModel(vehicleid))
					    {
	 				    	case 411:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
					            tunningupdate = CreateDynamicObject(18646,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, 0.000, 0.719, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Мигалка успешно установлена!");
    							GiveMoney(playerid,-10000);
					        }
					        case 541:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
                 				tunningupdate = CreateDynamicObject(18646,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, -0.189, 0.659, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Мигалка успешно установлена!");
    							GiveMoney(playerid,-10000);
					        }
					        case 451:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
					            tunningupdate = CreateDynamicObject(18646,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, -0.189, 0.659, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Мигалка успешно установлена!");
    							GiveMoney(playerid,-10000);
					        }
							case 415:
							{
							    if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
							    tunningupdate = CreateDynamicObject(18646,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, -0.430, 0.650, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Мигалка успешно установлена!");
    							GiveMoney(playerid,-10000);
							}
						}
					}
					case 2:
	 				{
	 				    switch(GetVehicleModel(vehicleid))
					    {
	 				        case 411:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
					            tunningupdate = CreateDynamicObject(1003,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, -2.331, 0.169, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Спойлер успешно установлен!");
    							GiveMoney(playerid,-10000);
					        }
					        case 541:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
                 				tunningupdate = CreateDynamicObject(1003,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, -2.219, 0.290, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Спойлер успешно установлен!");
    							GiveMoney(playerid,-10000);
					        }
					        case 451:
					        {
					            if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
					            tunningupdate = CreateDynamicObject(1003,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, -2.530, 0.190, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Спойлер успешно установлен!");
    							GiveMoney(playerid,-10000);
					        }
							case 415:
							{
							    if(PlayerInfo[playerid][pMoney]<10000) return SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}У Вас недостаточно денег!");
							    tunningupdate = CreateDynamicObject(1003,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
    							AttachDynamicObjectToVehicle(tunningupdate, GetPlayerVehicleID(playerid), 0.000, -2.419, 0.150, 0.000, 0.000, 0.000);
    							SendClientMessage(playerid,COLOR_VALIK,"[Информация] {FFFFFF}Спойлер успешно установлен!");
    							GiveMoney(playerid,-10000);
							}
						}
					}
			    }
		 	}

 

 

 

Edited by Drummer1993

Share this post


Link to post
Share on other sites

Мне да дм дрифт сервер пойдет! Сделай на многое кол-во машин, ещё придумай тюнинг. +реп 

Cделай под filterscripts 

Edited by denis_191105

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Antoxa39
      By Antoxa39
      Дратути) Я хочу поделится с новичками одной штучкой,с помощью которой можно сделать спидометр.
       
      Объявляем глобальные переменные.
      new Text:speedtest; В public OnPlayerConnect добавляем следующее.
      speedtest = TextDrawCreate(506.599884, 394.742156, "500 KM/H");// создаем текстдрав при подключении игрока (он не будет отображатся) В конце мода создаем новую функцию.
      forward getsp(playerid); public getsp(playerid) {     new Float:cord[3];     GetVehicleVelocity(GetPlayerVehicleID(playerid),cord[0], cord[1], cord[2]);     new Float:veloc = floatsqroot(floatpower(floatabs(cord[0]), 2.0) + floatpower(floatabs(cord[1]), 2.0) + floatpower(floatabs(cord[2]), 2.0)) * 181.3;     new str[25];     format(str,sizeof(str),"KM/H %d",floatround(veloc));     TextDrawSetString(speedtest,str);     return 1; } Переходим в OnPlayerStateChange и добавляем следующее.
      if(newstate == PLAYER_STATE_DRIVER) {     TextDrawShowForPlayer(playerid,speedtest);     SetTimerEx("getsp", 1, true, "%f", playerid); } if(newstate == PLAYER_STATE_ONFOOT) {     TextDrawHideForPlayer(playerid,speedtest); } ВСЁ!) Мы создали спидометр. Удачи вам в скриптинге!)