Code
ocmd:open(playerid, params[])
{
if(!IsPlayerConnected(playerid)) return 1;
for(new i = 0; i < sizeof(HouseInfo); i++) //37074
{
if(IsPlayerInRangeOfPoint(playerid,3.0,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || IsPlayerInRangeOfPoint(playerid,3.0,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(PlayerInfo[playerid][pPhousekey] == i)
{
if(HouseInfo[i][hLock] == 1)
{
HouseInfo[i][hLock] = 0;
GameTextForPlayer(playerid, "~w~Tuer ~g~Auf", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
if(HouseInfo[i][hLock] == 0)
{
HouseInfo[i][hLock] = 1;
GameTextForPlayer(playerid, "~w~Tuer ~g~Zu", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~Du besitzt keinen Schluessel", 5000, 6);
return 1;
}
}
for(new i = 0; i < sizeof(BizzInfo); i++) //37102
{
if(IsPlayerInRangeOfPoint(playerid,3.0,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || IsPlayerInRangeOfPoint(playerid,3.0,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i)
{
if(BizzInfo[i][bLocked] == 1)
{
BizzInfo[i][bLocked] = 0;
GameTextForPlayer(playerid, "~w~Bussiness ~g~geoeffnet", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
if(BizzInfo[i][bLocked] == 0)
{
BizzInfo[i][bLocked] = 1;
GameTextForPlayer(playerid, "~w~Bussiness ~r~geschlossen", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~Du besitzt keinen Schluessel", 5000, 6);
return 1;
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++) //37130
{
if(IsPlayerInRangeOfPoint(playerid,3.0,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i+100)
{
if(SBizzInfo[i][sbLocked] == 1)
{
SBizzInfo[i][sbLocked] = 0;
GameTextForPlayer(playerid, "~w~Bussiness ~g~geoeffnet", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
if(SBizzInfo[i][sbLocked] == 0)
{
SBizzInfo[i][sbLocked] = 1;
GameTextForPlayer(playerid, "~w~Bussiness ~r~geschlossen", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~Du besitzt keinen Schluessel", 5000, 6);
return 1;
}
}
}
for(new i = 0; i < sizeof(TankeInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,TankeInfo[i][tEntranceX], TankeInfo[i][tEntranceY], TankeInfo[i][tEntranceZ]))
{
if(PlayerInfo[playerid][pPtankekey] == i+100)
{
if(TankeInfo[i][tLocked] == 1)
{
TankeInfo[i][tLocked] = 0;
GameTextForPlayer(playerid, "~w~Tankstelle ~g~Offen", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
if(TankeInfo[i][tLocked] == 0)
{
TankeInfo[i][tLocked] = 1;
GameTextForPlayer(playerid, "~w~Tankstelle ~r~Geschlossen", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~Du besitzt keinen Schluessel", 5000, 6);
return 1;
}
}
}
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 2495.2378,-1690.5319,14.7656)) //Grove Street Eingang
{
if(PlayerInfo[playerid][pMember] != 13 && PlayerInfo[playerid][pLeader] != 13) return GameTextForPlayer(playerid, "~r~Du hast keinen~n~Schluessel.", 5000, 6);
if(gGroveDoor == 0)
{
gGroveDoor = 1;
GameTextForPlayer(playerid, "~r~Abgeschlossen", 3000, 1);
}
else if(gGroveDoor == 1)
{
gGroveDoor = 0;
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 3000, 1);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2807.5308,-1174.7401,1025.5703)) //Grove Street Ausgang
{
if(PlayerInfo[playerid][pMember] != 13 && PlayerInfo[playerid][pLeader] != 13) return GameTextForPlayer(playerid, "~r~Du hast keinen~n~Schluessel.", 5000, 6);
if(gGroveDoor == 0)
{
gGroveDoor = 1;
GameTextForPlayer(playerid, "~r~Abgeschlossen", 3000, 1);
}
else if(gGroveDoor == 1)
{
gGroveDoor = 0;
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 3000, 1);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 2000.0598,-1114.5679,27.1250)) //Ballas Eingang
{
if(PlayerInfo[playerid][pMember] != 14 && PlayerInfo[playerid][pLeader] != 14) return GameTextForPlayer(playerid, "~r~Du hast keinen~n~Schluessel.", 5000, 6);
if(gBallasDoor == 0)
{
gBallasDoor = 1;
GameTextForPlayer(playerid, "~r~Abgeschlossen", 3000, 1);
}
else if(gBallasDoor == 1)
{
gBallasDoor = 0;
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 3000, 1);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 318.6427,1115.3439,1083.8828)) //Ballas Ausgang
{
if(PlayerInfo[playerid][pMember] != 14 && PlayerInfo[playerid][pLeader] != 14) return GameTextForPlayer(playerid, "~r~Du hast keinen~n~Schluessel.", 5000, 6);
if(gBallasDoor == 0)
{
gBallasDoor = 1;
GameTextForPlayer(playerid, "~r~Abgeschlossen", 3000, 1);
}
else if(gBallasDoor == 1)
{
gBallasDoor = 0;
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 3000, 1);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1925.4205,664.2523,10.8203)) //Hitman Agency Eingang Eingang
{
if(PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pLeader] != 8) return GameTextForPlayer(playerid, "~r~Du hast keinen~n~Schluessel.", 5000, 6);
if(gHitmanDoor == 0)
{
gHitmanDoor = 1;
GameTextForPlayer(playerid, "~r~Abgeschlossen", 3000, 1);
}
else if(gHitmanDoor == 1)
{
gHitmanDoor = 0;
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 3000, 1);
}
}
else if(IsPlayerInRangeOfPoint(playerid, 2.0, -2636.6506,1403.2404,906.4609)) //Hitman Agency Eingang Ausgang
{
if(PlayerInfo[playerid][pMember] != 8 && PlayerInfo[playerid][pLeader] != 8) return GameTextForPlayer(playerid, "~r~Du hast keinen~n~Schluessel.", 5000, 6);
if(gHitmanDoor == 0)
{
gHitmanDoor = 1;
GameTextForPlayer(playerid, "~r~Abgeschlossen", 3000, 1);
}
else if(gHitmanDoor == 1)
{
gHitmanDoor = 0;
GameTextForPlayer(playerid, "~g~Aufgeschlossen", 3000, 1);
}
}
return 1;
}
Alles anzeigen
C:\Users\ASUS\Desktop\---\gamemodes\GFR.pwn(37074) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ASUS\Desktop---\gamemodes\GFR.pwn(37102) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ASUS\Desktop\---\gamemodes\GFR.pwn(37130) : warning 219: local variable "i" shadows a variable at a preceding level
Warum bekomme ich diese fehler?