08.02.2013, 18:57
Why isn't this displaying all 5 fishing slots instead of just 1?
pawn Код:
CMD:fishes(playerid, params[])
{
new string[2048];
SendClientMessage(playerid, COLOR_ORANGE, "Fish Inventory{FFFFFF}:");
if(PlayerInfo[playerid][pFishName1] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Slot 1: Empty.");
}
else if(PlayerInfo[playerid][pFishName1] == 1)
{
format(string, sizeof(string), "Slot 1: Shark weighing %d lbs.", PlayerInfo[playerid][pFish1]);
}
else if(PlayerInfo[playerid][pFishName1] == 2)
{
format(string, sizeof(string), "Slot 1: Clownfish weighing %d lbs.", PlayerInfo[playerid][pFish1]);
}
else if(PlayerInfo[playerid][pFishName1] == 3)
{
format(string, sizeof(string), "Slot 1: Angelfish weighing %d lbs.", PlayerInfo[playerid][pFish1]);
}
else if(PlayerInfo[playerid][pFishName1] == 4)
{
format(string, sizeof(string), "Slot 1: Catfish weighing %d lbs.", PlayerInfo[playerid][pFish1]);
}
else if(PlayerInfo[playerid][pFishName1] == 5)
{
format(string, sizeof(string), "Slot 1: Dogfish weighing %d lbs.", PlayerInfo[playerid][pFish1]);
}
else if(PlayerInfo[playerid][pFishName1] == 6)
{
format(string, sizeof(string), "Slot 1: Eel weighing %d lbs.", PlayerInfo[playerid][pFish1]);
}
else if(PlayerInfo[playerid][pFishName2] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Slot 2: Empty.");
}
else if(PlayerInfo[playerid][pFishName2] == 1)
{
format(string, sizeof(string), "Slot 2: Shark weighing %d lbs.", PlayerInfo[playerid][pFish2]);
}
else if(PlayerInfo[playerid][pFishName2] == 2)
{
format(string, sizeof(string), "Slot 2: Clownfish weighing %d lbs.", PlayerInfo[playerid][pFish2]);
}
else if(PlayerInfo[playerid][pFishName2] == 3)
{
format(string, sizeof(string), "Slot 2: Angelfish weighing %d lbs.", PlayerInfo[playerid][pFish2]);
}
else if(PlayerInfo[playerid][pFishName2] == 4)
{
format(string, sizeof(string), "Slot 2: Catfish weighing %d lbs.", PlayerInfo[playerid][pFish2]);
}
else if(PlayerInfo[playerid][pFishName2] == 5)
{
format(string, sizeof(string), "Slot 2: Dogfish weighing %d lbs.", PlayerInfo[playerid][pFish2]);
}
else if(PlayerInfo[playerid][pFishName2] == 6)
{
format(string, sizeof(string), "Slot 2: Eel weighing %d lbs.", PlayerInfo[playerid][pFish2]);
}
else if(PlayerInfo[playerid][pFishName3] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Slot 3: Empty.");
}
else if(PlayerInfo[playerid][pFishName3] == 1)
{
format(string, sizeof(string), "Slot 3: Shark weighing %d lbs.", PlayerInfo[playerid][pFish3]);
}
else if(PlayerInfo[playerid][pFishName3] == 2)
{
format(string, sizeof(string), "Slot 3: Clownfish weighing %d lbs.", PlayerInfo[playerid][pFish3]);
}
else if(PlayerInfo[playerid][pFishName3] == 3)
{
format(string, sizeof(string), "Slot 3: Angelfish weighing %d lbs.", PlayerInfo[playerid][pFish3]);
}
else if(PlayerInfo[playerid][pFishName3] == 4)
{
format(string, sizeof(string), "Slot 3: Catfish weighing %d lbs.", PlayerInfo[playerid][pFish3]);
}
else if(PlayerInfo[playerid][pFishName3] == 5)
{
format(string, sizeof(string), "Slot 3: Dogfish weighing %d lbs.", PlayerInfo[playerid][pFish3]);
}
else if(PlayerInfo[playerid][pFishName3] == 6)
{
format(string, sizeof(string), "Slot 3: Eel weighing %d lbs.", PlayerInfo[playerid][pFish3]);
}
else if(PlayerInfo[playerid][pFishName4] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Slot 4: Empty.");
}
else if(PlayerInfo[playerid][pFishName4] == 1)
{
format(string, sizeof(string), "Slot 4: Shark weighing %d lbs.", PlayerInfo[playerid][pFish4]);
}
else if(PlayerInfo[playerid][pFishName4] == 2)
{
format(string, sizeof(string), "Slot 4: Clownfish weighing %d lbs.", PlayerInfo[playerid][pFish4]);
}
else if(PlayerInfo[playerid][pFishName4] == 3)
{
format(string, sizeof(string), "Slot 4: Angelfish weighing %d lbs.", PlayerInfo[playerid][pFish4]);
}
else if(PlayerInfo[playerid][pFishName4] == 4)
{
format(string, sizeof(string), "Slot 4: Catfish weighing %d lbs.", PlayerInfo[playerid][pFish4]);
}
else if(PlayerInfo[playerid][pFishName4] == 5)
{
format(string, sizeof(string), "Slot 4: Dogfish weighing %d lbs.", PlayerInfo[playerid][pFish4]);
}
else if(PlayerInfo[playerid][pFishName4] == 6)
{
format(string, sizeof(string), "Slot 4: Eel weighing %d lbs.", PlayerInfo[playerid][pFish4]);
}
else if(PlayerInfo[playerid][pFishName5] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Slot 5: Empty.");
}
else if(PlayerInfo[playerid][pFishName5] == 1)
{
format(string, sizeof(string), "Slot 5: Shark weighing %d lbs.", PlayerInfo[playerid][pFish5]);
}
else if(PlayerInfo[playerid][pFishName5] == 2)
{
format(string, sizeof(string), "Slot 5: Clownfish weighing %d lbs.", PlayerInfo[playerid][pFish5]);
}
else if(PlayerInfo[playerid][pFishName5] == 3)
{
format(string, sizeof(string), "Slot 5: Angelfish weighing %d lbs.", PlayerInfo[playerid][pFish5]);
}
else if(PlayerInfo[playerid][pFishName5] == 4)
{
format(string, sizeof(string), "Slot 5: Catfish weighing %d lbs.", PlayerInfo[playerid][pFish5]);
}
else if(PlayerInfo[playerid][pFishName5] == 5)
{
format(string, sizeof(string), "Slot 5: Dogfish weighing %d lbs.", PlayerInfo[playerid][pFish5]);
}
else if(PlayerInfo[playerid][pFishName5] == 6)
{
format(string, sizeof(string), "Slot 5: Eel weighing %d lbs.", PlayerInfo[playerid][pFish5]);
}
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Bait{FFFFFF}: %d "Grey"- "Orange"Rod Durability{FFFFFF}: %d%", PlayerInfo[playerid][pBait], PlayerInfo[playerid][pRodDurab]);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}