Pomoc

Započeo Dow_Corelli, April 23, 2017, 19:10:50 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Od 0
Detaljan opis problema:
Dio skripte:
Mod je od nule
izbacuje waringe
C:\pawno\include\YSI\y_commands.inc(878) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(1437) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(1492) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(1545) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(1567) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(1630) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(1858) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(1962) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(2103) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\pawno\include\YSI\y_commands.inc(2400) : warning 219: local variable "hash" shadows a variable at a preceding level

u log

[13:46:27] [debug] Run time error 4: "Array index out of bounds"
[13:46:27] [debug]  Accessing element at index 1000 past array upper bound 999
[13:46:27] [debug] AMX backtrace:
[13:46:27] [debug] #0 0002720c in public OnPlPa_OnGameModeInit () from ZGRP.amx
[13:46:27] [debug] #1 native CallLocalFunction () from samp-server.exe
[13:46:27] [debug] #2 00024200 in public SSCANF_OnGameModeInit () from ZGRP.amx
[13:46:27] [debug] #3 0001e18c in ?? () from ZGRP.amx
[13:46:27] [debug] #4 0000758c in public Itter_OnGameModeInit () from ZGRP.amx
[13:46:27] [debug] #5 native CallLocalFunction () from samp-server.exe
[13:46:27] [debug] #6 0000215c in public ScriptInit_OnGameModeInit () from ZGRP.amx
[13:46:27] [debug] #7 000010e0 in public OnGameModeInit () from ZGRP.amx

[13:47:02] [debug] Run time error 4: "Array index out of bounds"
[13:47:02] [debug]  Accessing element at negative index -400
[13:47:02] [debug] AMX backtrace:
[13:47:02] [debug] #0 00088074 in public @_yCv (0, 19243524, 0) from ZGRP.amx
[13:47:02] [debug] #1 00087bdc in public @yC_v (0, 19243524, 0, 0) from ZGRP.amx
[13:47:02] [debug] #2 native CallRemoteFunction () from samp-server.exe
[13:47:02] [debug] #3 0001c85c in ?? (0, 19243512, 0) from ZGRP.amx
[13:47:02] [debug] #4 0001c190 in ?? (0, 19243512) from ZGRP.amx
[13:47:02] [debug] #5 000082a4 in public OnPlayerCommandText (0, 19243512) from ZGRP.amx
[13:47:04] [debug] Run time error 4: "Array index out of bounds"
[13:47:04] [debug]  Accessing element at negative index -400
[13:47:04] [debug] AMX backtrace:
[13:47:04] [debug] #0 00088074 in public @_yCv (0, 19243524, 0) from ZGRP.amx
[13:47:04] [debug] #1 00087bdc in public @yC_v (0, 19243524, 0, 0) from ZGRP.amx
[13:47:04] [debug] #2 native CallRemoteFunction () from samp-server.exe
[13:47:04] [debug] #3 0001c85c in ?? (0, 19243512, 0) from ZGRP.amx
[13:47:04] [debug] #4 0001c190 in ?? (0, 19243512) from ZGRP.amx
[13:47:04] [debug] #5 000082a4 in public OnPlayerCommandText (0, 19243512) from ZGRP.amx

[13:13:39] [debug] Run time error 6: "Invalid instruction"
[13:13:39] [debug]  Unknown opcode 0x3ddb108 at address 0x0000001C
[13:13:39] [debug] AMX backtrace:
[13:13:39] [debug] #0 0000001c in public @yC_napravivozilo () from ZGRP.amx
[13:13:39] [debug] #1 native CallRemoteFunction () from samp-server.exe
[13:13:39] [debug] #2 0001c7e4 in ?? (0, 19243096, 0) from ZGRP.amx
[13:13:39] [debug] #3 0001c190 in ?? (0, 19243096) from ZGRP.amx
[13:13:39] [debug] #4 000082a4 in public OnPlayerCommandText (0, 19243096) from ZGRP.amx
[13:13:50] [debug] Run time error 4: "Array index out of bounds"
[13:13:50] [debug]  Accessing element at negative index -400


evo gamemodeint i komanda v i napravivozilo

public OnGameModeInit()
{
SetGameModeText( SCRIPT_VERS );
SendRconCommand( "language "MAP_NAME"" );

EnableStuntBonusForAll(0); DisableInteriorEnterExits(); UsePlayerPedAnims();
ShowPlayerMarkers(false);  SetNameTagDrawDistance(30); AllowInteriorWeapons(1);
tgorivo = SetTimer("Gorivo1", 45000, true);
rgorivo = SetTimer("Gorivo", 60000, true);

for(new b = 0; b < sizeof(AM); b++)
{
new gFile[60];
format(gFile, sizeof(gFile), "SConfig/DeveloperMenu_%d.ini",b);
if(fexist(gFile))
{
INI_ParseFile(gFile, "UcitajDeveloperMenu", .bExtra = true, .extra = b);
}
}

for(new o; o < MAX_VOZILA; o++)
{
    if(VoziloJeAvion(GetVehicleModel(o)) || VoziloJeBrod(GetVehicleModel(o)) || VoziloJeKamion(GetVehicleModel(o))) Fuel[o] = 80;
    else if(VoziloJeMotor(GetVehicleModel(o))) Fuel[o] = 45;
    else if(VoziloJeBicikla(GetVehicleModel(o)) || GetVehicleModel(o) == 538) Fuel[o] = 1000000;
    else Fuel[o] = 45;
if(!VoziloJeBicikla(GetVehicleModel(o)))
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(o, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(o, 0, 0, alarm, doors, bonnet, boot, objective);
}
}

for(new i = 0; i < sizeof(VoziloInfo); i++)
{
new vFile[50];
        format(vFile, sizeof(vFile), AUTO_FILE, i);
        if(fexist(vFile))
        {
            INI_ParseFile(vFile, "UcitajVozila", .bExtra = true, .extra = i);
            if(VoziloInfo[i][vProdaja] == 0)
{
            VoziloInfo[i][vID] = CreateVehicle(VoziloInfo[i][vModel],VoziloInfo[i][vPozX],VoziloInfo[i][vPozY],VoziloInfo[i][vPozZ],VoziloInfo[i][vPozA],VoziloInfo[i][vBoja1],VoziloInfo[i][vBoja2],30000);
}
else if(VoziloInfo[i][vProdaja] == 1)
{
    VoziloInfo[i][vID] = CreateVehicle(VoziloInfo[i][vModel],VoziloInfo[i][vPozX],VoziloInfo[i][vPozY],VoziloInfo[i][vPozZ],VoziloInfo[i][vPozA],VoziloInfo[i][vBoja1],VoziloInfo[i][vBoja2],30000);
new vstrings[200];
format(vstrings,sizeof(vstrings),"{6DD91A}VOZILO NA PRODAJU!\n{6DD91A}Model: {FFFFFF}%s\n{6DD91A}Cena: {FFFFFF}$%d\n{6DD91A}Za kupovnu udjite u vozilo", ImenaVozila[VoziloInfo[i][vModel] - 400], VoziloInfo[i][vCena]);
CosLAB[VoziloInfo[i][vID]] = CreateDynamic3DTextLabel(vstrings, 0xFF0000FF, 0.0, 0.0, 0.5, 10.0, INVALID_PLAYER_ID, VoziloInfo[i][vID], 0, -1, -1, -1, 100.0);
TunirajVozilo(VoziloInfo[i][vID], i);
for(new p = 0; p < sizeof(PozicijePijacaZauzeta); p++)
{
if(PozicijePijacaZauzeta[p] == INVALID_VEHICLE_ID)
{
    if(IsVehicleInRangeOfPoint(VoziloInfo[i][vID], 2.0, PijacaPozicije[p][0], PijacaPozicije[p][1], PijacaPozicije[p][2]))
    {
        PozicijePijacaZauzeta[p] = VoziloInfo[i][vID];
        break;
}
    }
    }
}
}
}

for(new i = 0; i < sizeof(gpsInfo); i++)
    {
        new kFile[50];
        format(kFile, sizeof(kFile), GPS_FILE, i);
        if(fexist(kFile))
        {
INI_ParseFile(kFile, "LoadGPS", .bExtra = true, .extra = i);
}
}

for(new o; o < MAX_VOZILA; o++)
{
    VehCurrentNOS[o] = -1.0;
    vehnitro[o] = -1.0;
}
/////////////////////////////////////////////////////////////////////////////////////
busvozilo[0] = AddStaticVehicleEx(431,1780.0836,-1930.9801,13.4867,269.6190,1,1,1000); //
busvozilo[1] = AddStaticVehicleEx(431,1780.0095,-1925.5414,13.4925,269.4843,1,1,1000); //
busvozilo[2] = AddStaticVehicleEx(431,1780.0300,-1919.9363,13.4920,270.0146,1,1,1000); //
busvozilo[3] = AddStaticVehicleEx(431,1780.0364,-1914.2203,13.4906,270.3983,1,1,1000); //
busvozilo[4] = AddStaticVehicleEx(431,1780.0848,-1908.4395,13.4924,269.6162,1,1,1000); //
busvozilo[5] = AddStaticVehicleEx(431,1780.1636,-1902.4102,13.4903,269.9979,1,1,1000); //
///////////////////////////////////////////////////////////////////////////////////
pbusvozac = CreateDynamicPickup(1274, 1, 1752.8291,-1894.0505,13.5573); //posao bus vozac
ServerLabel[0] = C3D(""ZUTA"[ Posao ]\n"BELA"Da se zposli te kucaj /posao",0x9EC73DAA,1752.8291,-1894.0505,13.5573, 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 20.0);
return 1;
}


CMD:napravivozilo(playerid, params[])
{
    if(UlogovanIgrac[playerid] == 0) return Error(playerid, "Moras biti prijavljen.");
    if(PlayerInfo[playerid][pAdmin] < 6) return INFO(playerid, "moras biti admin level 6+");
new model, cena, boja1,boja2, vfiles[80];
GetPlayerPos(playerid,X,Y,Z);
if(sscanf(params, "iiii",model, cena, boja1,boja2))
{
    Koristi(playerid, "napravivozilo [model] [cena] [boja1] [boja2]");
    return 1;
}
if(model < 400 || model > 611) { Error(playerid, "Model vozila nemoze ici ispod 400 ili iznad 611 !"); return 1; }
if(boja1 < 0 || boja1 > 255) { Error(playerid, "Boja vozila nemoze ici ispod 0 ili iznad 255 !"); return 1; }
if(boja2 < 0 || boja2 > 255) { Error(playerid, "Boja vozila nemoze ici ispod 0 ili iznad 255 !"); return 1; }
if(cena < 1 || cena > 9999999) { Error(playerid, "Cena vozila nemoze ici ispod 1 ili iznad 9999999$!"); return 1; }
GetPlayerPos(playerid, X,Y,Z);
new Float: sk;
GetPlayerFacingAngle (playerid, sk);
new idveha = SledeceVozilo();
    if(idveha >= MAX_AUTA) return Error(playerid, "Maximum vozila je ogranicen i ne mozete vise dodavati.");
format(vfiles, sizeof(vfiles), AUTO_FILE, idveha);
if(fexist(vfiles)) return Error(playerid, "ID tog vozila postoji.");
VoziloInfo[idveha][vModel] = model;
VoziloInfo[idveha][vPozX] = X;
VoziloInfo[idveha][vPozY] = Y;
VoziloInfo[idveha][vPozZ] = Z;
VoziloInfo[idveha][vPozA] = sk;
VoziloInfo[idveha][vBoja1] = boja1;
VoziloInfo[idveha][vBoja2] = boja2;
VoziloInfo[idveha][vImaVlasnika] = 0;
VoziloInfo[idveha][vZakljucan] = 0;
VoziloInfo[idveha][vCannabis] = 0;
VoziloInfo[idveha][vKokain] = 0;
VoziloInfo[idveha][vMats] = 0;
VoziloInfo[idveha][vRadio] = 0;
VoziloInfo[idveha][vComponent0] = 0;
VoziloInfo[idveha][vComponent1] = 0;
VoziloInfo[idveha][vComponent2] = 0;
VoziloInfo[idveha][vComponent3] = 0;
VoziloInfo[idveha][vComponent4] = 0;
VoziloInfo[idveha][vComponent5] = 0;
VoziloInfo[idveha][vComponent6] = 0;
VoziloInfo[idveha][vComponent7] = 0;
VoziloInfo[idveha][vComponent8] = 0;
VoziloInfo[idveha][vComponent9] = 0;
VoziloInfo[idveha][vComponent10] = 0;
VoziloInfo[idveha][vComponent11] = 0;
VoziloInfo[idveha][vComponent12] = 0;
VoziloInfo[idveha][vComponent13] = 0;
VoziloInfo[idveha][vPaintJob] = 999;
VoziloInfo[idveha][vOruzije1] = -1;
VoziloInfo[idveha][vOruzije2] = -1;
VoziloInfo[idveha][vOruzije3] = -1;
VoziloInfo[idveha][vMunicija1] = 0;
VoziloInfo[idveha][vMunicija2] = 0;
VoziloInfo[idveha][vMunicija3] = 0;
VoziloInfo[idveha][vPrtljaznik] = 0;
VoziloInfo[idveha][vCena] = cena;
VoziloInfo[idveha][vProdaja] = 1;
VoziloInfo[idveha][vNeaktivnost] = 0;
strmid(VoziloInfo[idveha][vVlasnik], "Niko", 0, strlen("Niko"), 999);
VoziloInfo[idveha][vID] = CreateVehicle(VoziloInfo[idveha][vModel], VoziloInfo[idveha][vPozX],VoziloInfo[idveha][vPozY],VoziloInfo[idveha][vPozZ],VoziloInfo[idveha][vPozA], VoziloInfo[idveha][vBoja1], VoziloInfo[idveha][vBoja2], 30000);
new stringau[200];
    format(stringau,sizeof(stringau),"{6DD91A}VOZILO NA PRODAJU!\n{6DD91A}Model: {FFFFFF}%s\n{6DD91A}Cena: {FFFFFF}$%d\n{6DD91A}Za kupovnu udjite u vozilo", ImenaVozila[VoziloInfo[idveha][vModel] - 400], VoziloInfo[idveha][vCena]);
    CosLAB[VoziloInfo[idveha][vID]] = CreateDynamic3DTextLabel(stringau, 0xFF0000FF, 0.0, 0.0, 0.5, 10.0, INVALID_PLAYER_ID, VoziloInfo[idveha][vID], 0, -1, -1, -1, 100.0);
SacuvajVozilo(idveha);
StatusMotora(playerid, 1);
new idvehic = GetPlayerVehicleID(playerid);
if(VoziloJeAvion(GetVehicleModel(idvehic)) || VoziloJeBrod(GetVehicleModel(idvehic)) || VoziloJeKamion(GetVehicleModel(idvehic))) Fuel[idvehic] = 85.00;
else if(VoziloJeMotor(GetVehicleModel(idvehic))) Fuel[idvehic] = 45.00;
else if(VoziloJeBicikla(GetVehicleModel(idvehic)) || GetVehicleModel(idvehic) == 538) Fuel[idvehic] = 1000000.00;
else Fuel[idvehic] = 45.00;
format(nellys, sizeof(nellys), "![WARNING]: Admin %s je dodao vozilo na pijaci za kupovinu [VID:%d, FID:%d, Cena: %d$, Model:%s]", Ime_Igraca(playerid),VoziloInfo[idveha][vID],idveha,cena,ImenaVozila[model - 400]);
AdminPoruka(NARANDZASTA, nellys);
return 1;
}
CMD:v(playerid, params[])
{
new ImaAuto = 0;
if(PlayerInfo[playerid][Vozilo1] != -1) { ImaAuto = ImaAuto+1; }
if(PlayerInfo[playerid][Vozilo2] != -1) { ImaAuto = ImaAuto+1; }
if(PlayerInfo[playerid][Vozilo3] != -1) { ImaAuto = ImaAuto+1; }
if(ImaAuto == 0)
{
return Error(playerid, "Ne posedujete nijedno vozilo.");
}
new stringg[128],str[128],text1[128],text2[128],text3[128];
if(PlayerInfo[playerid][Vozilo1] != -1 && strcmp(Ime_Igraca(playerid), VoziloInfo[PlayerInfo[playerid][Vozilo1]][vVlasnik], true) == 0)
{
format(str,sizeof(str),"[1] %s (%d)",ImenaVozila[VoziloInfo[PlayerInfo[playerid][Vozilo1]][vModel] - 400], VoziloInfo[PlayerInfo[playerid][Vozilo1]][vID]);
    text1 = str;
}
else
{
text1 = "[1] "C_CRVENA"Prazno";
}
if(PlayerInfo[playerid][Vozilo2] != -1 && strcmp(Ime_Igraca(playerid), VoziloInfo[PlayerInfo[playerid][Vozilo2]][vVlasnik], true) == 0)
{
format(str,sizeof(str),"[2] %s (%d)",ImenaVozila[VoziloInfo[PlayerInfo[playerid][Vozilo2]][vModel] - 400], VoziloInfo[PlayerInfo[playerid][Vozilo2]][vID]);
    text2 = str;
}
else
{
text2 = "[2] "C_CRVENA"Prazno";
}
if(PlayerInfo[playerid][Vozilo3] != -1 && strcmp(Ime_Igraca(playerid), VoziloInfo[PlayerInfo[playerid][Vozilo3]][vVlasnik], true) == 0)
{
format(str,sizeof(str),"[3] %s (%d)",ImenaVozila[VoziloInfo[PlayerInfo[playerid][Vozilo3]][vModel] - 400], VoziloInfo[PlayerInfo[playerid][Vozilo3]][vID]);
    text3 = str;
}
else
{
text3 = "[3] "C_CRVENA"Prazno";
}
format(stringg,sizeof(stringg),"%s\n%s\n%s", text1, text2, text3);
ShowPlayerDialog(playerid,DIALOG_VOZILOMENI,DIALOG_STYLE_LIST,"{00C0FF}Odaberite vozilom kojim ce te upravljati:",stringg,"Potvrdi","Odustani");
return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno):/