17.11.2018, 05:09
Does someone can help me fix it?
When i start samp-server.exe always like this.
The gamemode will keep restarting and i can start my gamemode
Heres the code
And This...
When i start samp-server.exe always like this.
The gamemode will keep restarting and i can start my gamemode
Code:
Number of vehicle models: 28 Pickups Max = 100, Current Pickups = 78 [debug] Run time error 4: "Array index out of bounds" [debug] Attempted to read/write array element at index 1 in array of size 1 [debug] AMX backtrace: [debug] #0 00052ad0 in public AddCar (1) from one.amx [debug] #1 0003f384 in public OnGameModeInit () from one.amx Reading File: blank Reading File: properties/houses.txt Reading File: properties/businesses.txt Reading File: properties/banks.txt Reading File: properties/police.txt
Code:
forward AddCar(carcoords);
public OnGameModeInit()
{
for(new i = 0; i < 165; i++)
{
AddCar(i);
}
CarInit();
return 1;
}
public AddCar(carcoords)
{
new randcol = random(126);
new randcol2 = 1;
if (rccounter == 14)
{
rccounter = 0;
}
AddStaticVehicleEx(carselect[rccounter], CarSpawns[carcoords][pos_x], CarSpawns[carcoords][pos_y], CarSpawns[carcoords][pos_z], CarSpawns[carcoords][z_angle], randcol, randcol2, 60000);
rccounter++;
return 1;
}
Code:
public OnGameModeInit()
{
new string[MAX_PLAYER_NAME];
new string1[MAX_PLAYER_NAME];
for(new c=0;c<CAR_AMOUNT;c++)
{
Gas[c] = GasMax;
}
LoadProperty();
LoadBizz();
LoadSBizz();
LoadBoxer();
LoadStuff();
LoadIRC();
LoadFamilies();
LoadCK();
LoadTurfs();
LoadPapers();
IRCInfo[0][iPlayers] = 0; IRCInfo[1][iPlayers] = 0; IRCInfo[2][iPlayers] = 0;
IRCInfo[3][iPlayers] = 0; IRCInfo[4][iPlayers] = 0; IRCInfo[5][iPlayers] = 0;
IRCInfo[6][iPlayers] = 0; IRCInfo[7][iPlayers] = 0; IRCInfo[8][iPlayers] = 0;
IRCInfo[9][iPlayers] = 0;
News[hTaken1] = 0; News[hTaken2] = 0; News[hTaken3] = 0; News[hTaken4] = 0; News[hTaken5] = 0;
format(string, sizeof(string), "Nothing");
strmid(News[hAdd1], string, 0, strlen(string), 255);
strmid(News[hAdd2], string, 0, strlen(string), 255);
strmid(News[hAdd3], string, 0, strlen(string), 255);
strmid(News[hAdd4], string, 0, strlen(string), 255);
strmid(News[hAdd5], string, 0, strlen(string), 255);
format(string1, sizeof(string1), "No-one");
strmid(News[hContact1], string1, 0, strlen(string1), 255);
strmid(News[hContact2], string1, 0, strlen(string1), 255);
strmid(News[hContact3], string1, 0, strlen(string1), 255);
strmid(News[hContact4], string1, 0, strlen(string1), 255);
strmid(News[hContact5], string1, 0, strlen(string1), 255);
PlayerHaul[78][pCapasity] = 100;
PlayerHaul[79][pCapasity] = 100;
PlayerHaul[80][pCapasity] = 50;
PlayerHaul[81][pCapasity] = 50;
SetGameModeText("Hillside Rp V0.5");
format(objstore, sizeof(objstore), "MOLE: I got nothing, check back with me later.");
format(cbjstore, sizeof(cbjstore), "HQ: There is nothing in your Vicinity, Out.");
format(motd, sizeof(motd), "Welcome to the Role Play - Life in 90's Server.");
gettime(ghour, gminute, gsecond);
FixHour(ghour);
ghour = shifthour;
if(!realtime)
{
SetWorldTime(wtime);
}
SetPDistance(10);
AllowInteriorWeapons(1);
UsePlayerPedAnims();
DisableInteriorEnterExits();
// CreatedCars check
for(new i = 0; i < sizeof(CreatedCars); i++)
{
CreatedCars[i] = 0;
}
// Zones
for(new i = 0; i < sizeof(TurfInfo); i++)
{
Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
}
// Player Class's
for(new i = 0; i <= sizeof(Peds)-1; i++)
{
AddPlayerClass(Peds[i][0],1958.3783,1343.1572,1100.3746,269.1425,-1,-1,-1,-1,-1,-1);
}
// Car Spawns
for(new h = 0; h < sizeof(HouseInfo); h++)
{
AddStaticVehicleEx(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 60000);
gCarLock[h+1] = 1;
}//34
.......
.......
Theres so much more


