[Pomoc] warning 219: local variable "s"


Započeo VuKaN, Januar 28, 2016, 23:58:34 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Edit EasyMoney
Detaljan opis problema
warning 219: local variable "s" shadows a variable at a preceding level

Dio skripte: Pod
OnPlayerEnterVehicle

if(lokic[vehicleid] == 1)
{
if(PolicijskaAuta(vehicleid))
{
if(PlayerInfo[playerid][pClan] != 1 || PlayerInfo[playerid][pLider] != 1)
{
SendClientMessage(playerid,-1,CRVENA"NISTE CLAN LSPD-a!");
RemovePlayerFromVehicle(playerid);
}
}
}

New:
new lokic[MAX_VEHICLES];

PolicijskaAuta

stock PolicijskaAuta(carid)
{
	for(new i = 0; i < sizeof(lspd); i++)
	{
		if(carid == lspd[i])	return 1;
	}
	return 0;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): /
Srecu cine male stvari i veliko pivo!
x3M-Gaming USKORO!

Izvinjavam se sto BUMP-am temu, ali ne mogu nikako da resim problem sa vozilima LSPD-a, evo vam svi kodovi. Ovo gore sam pokusavao nesto ali ocigledno da moram sve da menjam sa varijablom 's'.

new lspd[21];


lspd[4] = AddStaticVehicleEx_H(596, 1580.3531, -1658.8425, 13.2083, 0.0000, -1, -1, -1);
lspd[5] = AddStaticVehicleEx_H(596, 1584.1254, -1658.8694, 13.2104, 0.0000, -1, -1, -1);
lspd[6] = AddStaticVehicleEx_H(596, 1588.3712, -1659.0337, 13.1537, 0.0000, -1, -1, -1);
lspd[7] = AddStaticVehicleEx_H(596, 1592.8070, -1659.0970, 13.1739, 0.3060, -1, -1, -1);
lspd[8] = AddStaticVehicleEx_H(596, 1596.6603, -1659.1743, 13.2767, 0.3060, -1, -1, -1);
lspd[9] = AddStaticVehicleEx_H(523, 1576.3701, -1659.6978, 12.9946, 359.7066, -1, -1, -1);
lspd[10] = AddStaticVehicleEx_H(523, 1572.7357, -1659.6113, 12.9952, 359.7066, -1, -1, -1);
lspd[11] = AddStaticVehicleEx_H(523, 1574.6024, -1659.7063, 12.9962, 359.7066, -1, -1, -1);
lspd[12] = AddStaticVehicleEx_H(601, 1583.5389, -1641.6818, 13.1296, 180.0000, -1, -1, -1);
lspd[13] = AddStaticVehicleEx_H(601, 1579.2866, -1641.9272, 13.1296, 180.0000, -1, -1, -1);
lspd[14] = AddStaticVehicleEx_H(427, 1592.4867, -1642.3446, 13.4816, 180.0000, -1, -1, -1);
lspd[15] = AddStaticVehicleEx_H(427, 1587.8951, -1642.2015, 13.5432, 180.0000, -1, -1, -1);
lspd[16] = AddStaticVehicleEx_H(497, 1547.7604, -1676.0298, 33.1776, 90.0000, -1, -1, -1);
lspd[17] = AddStaticVehicleEx_H(497, 1565.9847, -1677.2014, 33.1776, 90.0000, -1, -1, -1);

new object20 = CreateObject(19327, 0, 0, 0, 0, 0, 0);
new object21 = CreateObject(19327, 0, 0, 0, 0, 0, 0);

lspd[0] = AddStaticVehicleEx_H(579, 1599.3080, -1649.4298, 13.5746, 90.0000, 1, 1, -1);
AttachObjectToVehicle(object20, lspd[0], -1.17210, -0.00020, 0.00900,   0.00000, 0.00000, -90.00000);
AttachObjectToVehicle(object21, lspd[0], 1.17440, 0.04960, 0.00900,   0.00000, 0.00000, 90.00000);
SetObjectMaterialText(object20, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
SetObjectMaterialText(object21, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);

new object22 = CreateObject(19327, 0, 0, 0, 0, 0, 0);
new object23 = CreateObject(19327, 0, 0, 0, 0, 0, 0);

lspd[1] = AddStaticVehicleEx_H(579, 1599.4213, -1653.0582, 13.5746, 90.0000, 1, 1, -1);
AttachObjectToVehicle(object22, lspd[1], -1.17210, -0.00020, 0.00900,   0.00000, 0.00000, -90.00000);
AttachObjectToVehicle(object23, lspd[1], 1.17440, 0.04960, 0.00900,   0.00000, 0.00000, 90.00000);
SetObjectMaterialText(object22, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
SetObjectMaterialText(object23, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);

new object24 = CreateObject(19327, 0, 0, 0, 0, 0, 0);
new object25 = CreateObject(19327, 0, 0, 0, 0, 0, 0);

lspd[2] = AddStaticVehicleEx_H(579, 1599.7186, -1641.8972, 13.5426, 180.0000, 1, 1, -1);
AttachObjectToVehicle(object24, lspd[2], -1.17210, -0.00020, 0.00900,   0.00000, 0.00000, -90.00000);
AttachObjectToVehicle(object25, lspd[2], 1.17440, 0.04960, 0.00900,   0.00000, 0.00000, 90.00000);
SetObjectMaterialText(object24, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
SetObjectMaterialText(object25, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);

new object26 = CreateObject(19327, 0, 0, 0, 0, 0, 0);
new object27 = CreateObject(19327, 0, 0, 0, 0, 0, 0);

lspd[3] = AddStaticVehicleEx_H(579, 1596.1383, -1641.9945, 13.5576, 180.0000, 1, 1, -1);
AttachObjectToVehicle(object26, lspd[3], -1.17210, -0.00020, 0.00900,   0.00000, 0.00000, -90.00000);
AttachObjectToVehicle(object27, lspd[3], 1.17440, 0.04960, 0.00900,   0.00000, 0.00000, 90.00000);
SetObjectMaterialText(object26, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
SetObjectMaterialText(object27, "POLICIJA", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 28, 1, 0xFFFFFFFF, 0, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);


Pod
public OnPlayerStateChange(playerid, newstate, oldstate)



        else if(v >= lspd[0] && v <= lspd[11])
		{
		    if(PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pClan] == 1) { }
		    else {
		        SCM(playerid, GRAD2, "Niste clan LSPD-a.");
		        RemovePlayerFromVehicle_H(playerid);
		        return 1; }
		        if(PlayerInfo[playerid][pDuty] == 0) {
		        RemovePlayerFromVehicle_H(playerid);
		        SCM(playerid,GRAD2,"Ne mozete voziti sluzbeno vozilo, jer niste na duznosti.");
		        return 1;
		        }
		}
		else if(v >= lspd[12] && v <= lspd[13])
		{
            if(PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pClan] == 1) { }
		    else {
		        SCM(playerid, GRAD2, "Niste clan LSPD-a.");
		        RemovePlayerFromVehicle_H(playerid);
		        return 1; }
		        if(PlayerInfo[playerid][pDuty] == 0) {
		        RemovePlayerFromVehicle_H(playerid);
		        SCM(playerid,GRAD2,"Ne mozete voziti sluzbeno vozilo, jer niste na duznosti.");
		        return 1;
		        }
		}
		else if(v >= lspd[14] && v <= lspd[15])
		{
            if(PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pClan] == 1) { }
		    else {
		        SCM(playerid, GRAD2, "Niste clan LSPD-a.");
		        RemovePlayerFromVehicle_H(playerid);
		        return 1; }
		        if(PlayerInfo[playerid][pDuty] == 0) {
		        RemovePlayerFromVehicle_H(playerid);
		        SCM(playerid,GRAD2,"Ne mozete voziti sluzbeno vozilo, jer niste na duznosti.");
		        return 1;
		        }
		}
		else if(v >= lspd[16] && v <= lspd[17])
		{
			if(PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pClan] == 1) { }
		    else {
		        SCM(playerid, GRAD2, "Niste clan LSPD-a.");
		        RemovePlayerFromVehicle_H(playerid);
		        return 1; }
		        if(PlayerInfo[playerid][pDuty] == 0) {
		        RemovePlayerFromVehicle_H(playerid);
		        SCM(playerid,GRAD2,"Ne mozete voziti sluzbeno vozilo, jer niste na duznosti.");
		        return 1;
		        }
		}

forward GorivoMinus();
public GorivoMinus()
{
	for(new car = 1; car < MAX_VEHICLES; car++)
	{
       new engine2, lights2, alarm2, doors2, bonnet2, boot2, objective2;
       GetVehicleParamsEx(car, engine2, lights2, alarm2, doors2, bonnet2, boot2, objective2);
       if(engine2 == 1)
       {
	    if(VoziloJeBicikla(car)) continue;
	    if(car >= lspd[0] && car <= lspd[20]) continue;


forward UljeMinus();
public UljeMinus()
{
	for(new car = 1; car < MAX_VEHICLES; car++)
	{
       new engine2, lights2, alarm2, doors2, bonnet2, boot2, objective2;
       GetVehicleParamsEx(car, engine2, lights2, alarm2, doors2, bonnet2, boot2, objective2);
       if(engine2 == 1)
       {
	    if(VoziloJeBicikla(car)) continue;
	    if(car >= lspd[0] && car <= lspd[20]) continue;

CMD:tune(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1017.6458,-917.3843,42.1797))
    {
		if(WantedLevel[playerid] > 0) return SCM(playerid,SIVA,"Ne mozes to dok imas wanted level");
		new playerstate = GetPlayerState(playerid);
		new car = GetPlayerVehicleID(playerid);
	    if(car >= lspd[0] && car <= lspd[20]) return SCM(playerid, GRAD2, "Ne mozes tunirati vozila organizacija.");


CMD:tunecar(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pSupporter] > 1 || PlayerInfo[playerid][pDonator] > 1 || PlayerInfo[playerid][pPromoter] > 0)
	{
	if(sduty[playerid] == 0)
	{
	if(PlayerInfo[playerid][pSupporter] > 0)
	{
	SCM(playerid,GRAD2,"Ne mozes to, nisi na duznosi!");
	return 1;
	}
	}
		if(PlayerInfo[playerid][pDonator] > 0 && WantedLevel[playerid] > 0) return SCM(playerid,SIVA,"Ne mozes to dok imas wanted level");
		if(PlayerInfo[playerid][pPromoter] > 0 && WantedLevel[playerid] > 0) return SCM(playerid,SIVA,"Ne mozes to dok imas wanted level");
		new playerstate = GetPlayerState(playerid);
		new car = GetPlayerVehicleID(playerid);
	    if(car >= lspd[0] && car <= lspd[20]) return SCM(playerid, GRAD2, "Ne mozes tunirati vozila organizacija.");


CMD:m(playerid, params[])
{
	if(!IsACop(playerid)) return SCM(playerid, GRAD2, "Nisi clan PD/ZAND/PA");
	if(!IsPlayerInAnyVehicle(playerid))
            {
             SCM(playerid, ZUTA,"* Morate biti u vozilu.");
             return 1;
             }
	if(GetPlayerVehicleID(playerid) < lspd[0] || GetPlayerVehicleID(playerid) > lspd[20] || GetPlayerVehicleID(playerid) < fbicar[0] || GetPlayerVehicleID(playerid) > fbicar[9])
	{
	}
	else return SCM(playerid, GRAD2, "{07C1F5}{FFFFFF} Niste u policiskom vozilu!");
	new poruka[128], hIme[MAX_PLAYER_NAME];
	if(sscanf(params, "s[128]", poruka)) return SCM(playerid, GRAD3, "Koristite: {BFC0C2}/m [Text]");
	if(PlayerInfo[playerid][pMuted] != 0) return SCM(playerid, CRVENA, "EM HP | {FFFFFF}Utisani ste, ne mozete koristiti chat!");
	if(PlayerInfo[playerid][pRank] < 3) return SCM(playerid, CRVENA, "{FFFFFF}Samo rank 3+");
	if(mponovo[playerid] == 1) return SCM(playerid, CRVENA, "{FFFFFF}Sacekaj malo.");
    if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1)
    {
	RPIme(playerid, hIme);
	format(CmdString, sizeof CmdString, "{F5C00A}* [Policajac %s o< : %s]", hIme, poruka);
	ProxDetector(70.0, playerid, CmdString, ZUTA, ZUTA, ZUTA, ZUTA, ZUTA);
	mponovo[playerid] = 1;
	SetTimerEx("MPonovo", 30000, false, "i", playerid);
	}
    if(PlayerInfo[playerid][pClan] == 2 || PlayerInfo[playerid][pLider] == 2)
    {
	RPIme(playerid, hIme);
	format(CmdString, sizeof CmdString, "{F5C00A}* [Agent %s o< : %s]", hIme, poruka);
	ProxDetector(70.0, playerid, CmdString, ZUTA, ZUTA, ZUTA, ZUTA, ZUTA);
	mponovo[playerid] = 1;
    SetTimerEx("MPonovo", 30000, false, "i", playerid);
	}
	return 1;
}

forward RespawnujNePrivatna();
public RespawnujNePrivatna()
{
	 for(new car = 1; car <= 1200; car++)
	    {
		if(IsVehicleEmpty(car))
		{
		if(NoRac[car] == 0)
		{
		if(car >= lspd[0] && car <= lspd[20])
		{
Poslednja Izmena: Januar 29, 2016, 02:46:51 PRE PODNE od VuKaN
Srecu cine male stvari i veliko pivo!
x3M-Gaming USKORO!