SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Русский/Russian

Reply
 
Thread Tools Display Modes
Old 16/05/2017, 10:45 AM   #1
Surprice
Big Clucker
 
Join Date: Mar 2015
Posts: 103
Reputation: 0
Default Создание автомобилей

Приветствую всех форумчан!

Проблема в том что создается только одно транспортное средство в гараже, а должно спавниться - 5 автомобилей.

Ошибка крашдетекта:
PHP Code:
[13:28:53] [debugRun time error 4"Array index out of bounds"
[13:28:53] [debug]  Attempted to read/write array element at index 65535 in array of size 2000
[13:28:53] [debugAMX backtrace:
[
13:28:53] [debug#0 00096eb8 in CreateVehicleAC (model=0, Float:x=511.43341, Float:y=518.25427, Float:z=1002.35968, Float:r=126.67470, c=0, c_=0, spawn=86400, siren=0) at C:\Users\root\Desktop\gamemode\gamemodes\gm.pwn:2766
[13:28:53] [debug#1 003dfea4 in SpawnCarTwo (playerid=0, Float:x=511.43341, Float:y=518.25427, Float:z=1002.35968, Float:range=126.67470) at C:\Users\root\Desktop\gamemode\gamemodes\gm.pwn:46048
[13:28:53] [debug#2 003abf0c in public OnMySQL_QUERY (idx=33, playerid=0, str[]=@00e21fac "") at C:\Users\root\Desktop\gamemode\gamemodes\gm.pwn:43626 


Код на что ошибки:
PHP Code:
CreateVehicleAC(modelFloat:x,Float:y,Float:z,Float:rcc_spawnsiren 0)
{
    new 
TempID CreateVehicle(model,x,y,z,r,c,c_,spawnsiren);
    
car_ex[TempID] = true;
    
car_coord[TempID][0] = x;
    
car_coord[TempID][1] = y;
    
car_coord[TempID][2] = z;
    
car_coord[TempID][3] = r;
    return 
TempID;
}

Создаём автомобиль


PHP Code:
stock SpawnCarTwo(playeridFloat:xFloat:yFloat:zFloat:range)
{
    
garage_car[playerid][1] = CreateVehicle(CarInfo[playerid][carModel][1], xyzrange CarInfo[playerid][carColor_one][1] ,CarInfo[playerid][carColor_two][1], 86400);
    
SetVehicleParamsEx(garage_car[playerid][1],false,false,false,true,false,false,false);
    
CarHealth[garage_car[playerid][1]] = float(1000);
    
createdcar ++;
    
Fuell[garage_car[playerid][1]] = CarInfo[playerid][carFuel][0];
    
LoadTuning(playerid,garage_car[playerid][1],1);
    
SetPVarInt(playerid,"CarsInGarage",1);



PHP Code:
case 5// house S Class
                    
{
                        
SpawnCarOne(playerid511.2867,505.0032,1002.3588,47.6021); // Load car #1
                        
LinkVehicleToInterior(garage_car[playerid][0], 19);
                        
SetVehicleVirtualWorld(garage_car[playerid][0], house+100);
                        
//----------------------
                        
SpawnCarTwo(playerid511.4334,518.2543,1002.3597,126.6747); // Load car #2
                        
LinkVehicleToInterior(garage_car[playerid][1], 19); // именно на этот код 3 ошибка
                        
SetVehicleVirtualWorld(garage_car[playerid][1], house+100);
                        
//----------------------
                        
SpawnCarThree(playerid504.8487,503.1697,1002.3583,90.2742); // Load car #3
                        
LinkVehicleToInterior(garage_car[playerid][2], 19);
                        
SetVehicleVirtualWorld(garage_car[playerid][2], house+100);
                           
//----------------------
                        
SpawnCarFour(playerid504.5507,512.3398,1002.3583,91.0430); // Load car #4
                        
LinkVehicleToInterior(garage_car[playerid][3], 19);
                        
SetVehicleVirtualWorld(garage_car[playerid][3], house+100);
                        
//----------------------
                        
SpawnCarFive(playerid504.7199,521.3282,1002.3588,90.3364); // Load car #5
                        
LinkVehicleToInterior(garage_car[playerid][4], 19);
                        
SetVehicleVirtualWorld(garage_car[playerid][4], house+100);
                    } 


В чём же может быть дело?
Surprice is offline   Reply With Quote
Old 16/05/2017, 01:10 PM   #2
ZiGGi
High-roller
 
ZiGGi's Avatar
 
Join Date: Sep 2008
Location: Russia
Posts: 1,563
Reputation: 223
Default Re: Создание автомобилей

Достигнут лимит транспортных средств.
ZiGGi is offline   Reply With Quote
Old 16/05/2017, 01:37 PM   #3
Surprice
Big Clucker
 
Join Date: Mar 2015
Posts: 103
Reputation: 0
Default Re: Создание автомобилей

Quote:
Originally Posted by ZiGGi View Post
Достигнут лимит транспортных средств.
75 автомобилей всего загружается при запуске сервера.
Surprice is offline   Reply With Quote
Old 16/05/2017, 02:45 PM   #4
Eims
Huge Clucker
 
Eims's Avatar
 
Join Date: May 2013
Location: Восточный Мордор
Posts: 299
Reputation: 8
Default Re: Создание автомобилей

Quote:
CreateVehicleAC (model=0, Float=511.43341, Float:y=518.25427, Float:z=1002.35968, Float:r=126.67470, c=0, c_=0, spawn=86400, siren=0)
Неверный ID модели передаёшь потому что
Eims is offline   Reply With Quote
Old 16/05/2017, 03:58 PM   #5
Surprice
Big Clucker
 
Join Date: Mar 2015
Posts: 103
Reputation: 0
Default Re: Создание автомобилей

Quote:
Originally Posted by Eims View Post
Неверный ID модели передаёшь потому что
Спасибо. Исправил.
Surprice is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Создание диалога Pe3aK Русский/Russian 12 23/07/2014 08:43 PM
Создание TextDraw Nikid Русский/Russian 5 07/06/2011 02:24 PM
Создание окна ~Davids~ Русский/Russian 2 07/02/2011 04:11 PM
Создание РП мода dima670 Русский/Russian 2 12/01/2011 05:06 AM
[Help] создание банд HIDAN Русский/Russian 13 04/06/2010 09:57 PM


All times are GMT. The time now is 03:40 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.