• Страница 1 из 1
  • 1
Модератор форума: AlexPPPP  
[C.M.D] /fixcar
DrExtremДата: Вторник, 02.10.2012, 16:14 | Сообщение # 1
.::Offline::.
Разбойник
Сообщений: 34
[ 8 ]
Награды: 2

Статус отсутствует
Простая команда для респавна машины за деньги.

Code
else if(strcmp(cmd, "/fixcar", true) == 0)  
     {  
                     if(PlayerInfo[playerid][pCash] < 5000) return SendClientMessage(playerid, COLOR_WHITE, "Не достаточно денег!");  
                     if(PlayerInfo[playerid][pPhousekey] !=255)  
                     {  
                     for(new i = 0; i < MAX_PLAYERS; i++)  
                     {  
                     if(IsPlayerInVehicle(i, caridhouse[playerid]))  
                     {  
                         SendClientMessage(playerid, COLOR_GREY,"Ваша машина в угоне!");  
                         return 1;  
                     }  
                     }  
                       new house = PlayerInfo[playerid][pPhousekey];  
                        DestroyVehicle(caridhouse[playerid]);  
                     caridhouse[playerid] = CreateVehicle(PlayerInfo[playerid][pCar], HouseInfo[house][hCarx], HouseInfo[house][hCary], HouseInfo[house][hCarz], HouseInfo[house][hCarc] , PlayerInfo[playerid][pCvet] , HouseInfo[house][hVcol2],5600);  
                     LockCar(caridhouse[playerid]);  
                     createdcar = caridhouse[playerid];  
                     Fuell[caridhouse[playerid]] = PlayerInfo[playerid][pFuelcar];  
                     //Fuell[vehicleid] = 50;  
                     createdcar ++;  
                     GameTextForPlayer(playerid, "~r~$-5000", 5000, 1);  
                     PlayerInfo[playerid][pCash] -= 5000;  
                     PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);  
                     new playername[MAX_PLAYER_NAME];  
                     GetPlayerName(playerid,playername,sizeof(playername));  
                     format(string,sizeof(string),"%s.ini",playername);  
                     new File = ini_openFile(string);  
                     ini_getString(File,"Numbercar",string);  
                     //CompVeh(caridhouse[playerid]);  
                     ini_closeFile(File);  
                     SetVehicleNumberPlate(caridhouse[playerid], string);  
                     AddVehicleComponent (caridhouse[playerid], PlayerInfo[playerid][pKolesocar]);  
                     AddVehicleComponent (caridhouse[playerid], PlayerInfo[playerid][pNitro]);  
                     AddVehicleComponent (caridhouse[playerid], PlayerInfo[playerid][pGidra]);  
                     if(PJ(caridhouse[playerid]))  
                     {  
                     ChangeVehiclePaintjob(caridhouse[playerid], PlayerInfo[playerid][pPokraska]);  
                     AddVehicleComponent (caridhouse[playerid], PlayerInfo[playerid][pSpoiler]);  
                     AddVehicleComponent (caridhouse[playerid], PlayerInfo[playerid][pBamper1]);  
                     AddVehicleComponent (caridhouse[playerid], PlayerInfo[playerid][pBamper2]);  
                     }  
                     }  
         return 1;  
     }
 
  • Страница 1 из 1
  • 1
Поиск:


Copyright www.SAMP-TEAM.com (c) 2009-2024
Правила использования материалов сайта

При копировании материалов из нашего сайта
ссылка на www.SAMP-TEAM.com обязательна!
Нарушители правил будут строго наказаны!

Хостинг от uCoz   
Для корректного просмотра мы рекомендуем Вам использовать браузер Google Chrome.
Яндекс.Метрика