/v list not showing correctly
#1

Hello, i am having a vehicle system, which allows you to own 5 vehicles, and get a list of your vehicles by typing "/v list" but if i dont have 5 vehicles, but 1,2,3 or 4 vehicles it will show the list and "SERVER: Unknown Command" appears under the list.. And, if i own 5 vehicles and sell...lets say.. vehicle number 3, and then type /v list, it will only show vehicle number 1 and number 2. I hope you Guys can help me

Ps. sorry for my bad English :P

pawn Код:
if(strcmp(x_job,"list",true) == 0)
            {
                for(new i = 0; i < sizeof(CarInfo); i++)
                {
                    if(PlayerInfo[playerid][pCarkey] == SCRIPT_CARS)
                    if(PlayerInfo[playerid][pCarkey2] == SCRIPT_CARS)
                    if(PlayerInfo[playerid][pCarkey3] == SCRIPT_CARS)
                    if(PlayerInfo[playerid][pCarkey4] == SCRIPT_CARS)
                    if(PlayerInfo[playerid][pCarkey5] == SCRIPT_CARS)
                    {
                       SendClientMessage(playerid,COLOR_GREY,"No vehicles found.");
                       return 1;
                    }
                    new carkey = PlayerInfo[playerid][pCarkey],carkey2 = PlayerInfo[playerid][pCarkey2],carkey3 = PlayerInfo[playerid][pCarkey3],carkey4 = PlayerInfo[playerid][pCarkey4],carkey5 = PlayerInfo[playerid][pCarkey5];
                    format(string, sizeof(string), ""COL_GREY"1. {FF6347}%s"COL_GREY"  Value[%d]  Color 1[%d]  Color 2[%d]  Locked[%d]  Impounded[%d]  Impound Price[%d]", CarInfo[carkey][cDescription], CarInfo[carkey][cValue], CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], CarInfo[carkey][cLock],CarInfo[carkey][cImpounded],CarInfo[carkey][cImpoundedPrice]);
                    SendClientMessage(playerid, COLOR_GREY,string);
                    format(string, sizeof(string), ""COL_GREY"2. {FF6347}%s"COL_GREY"  Value[%d]  Color 1[%d]  Color 2[%d]  Locked[%d]  Impounded[%d]  Impound Price[%d]", CarInfo[carkey2][cDescription], CarInfo[carkey2][cValue], CarInfo[carkey2][cColorOne], CarInfo[carkey2][cColorTwo], CarInfo[carkey2][cLock],CarInfo[carkey2][cImpounded],CarInfo[carkey2][cImpoundedPrice]);
                    SendClientMessage(playerid, COLOR_GREY,string);
                    format(string, sizeof(string), ""COL_GREY"3. {FF6347}%s"COL_GREY"  Value[%d]  Color 1[%d]  Color 2[%d]  Locked[%d]  Impounded[%d]  Impound Price[%d]", CarInfo[carkey3][cDescription], CarInfo[carkey3][cValue], CarInfo[carkey3][cColorOne], CarInfo[carkey3][cColorTwo], CarInfo[carkey3][cLock],CarInfo[carkey3][cImpounded],CarInfo[carkey3][cImpoundedPrice]);
                    SendClientMessage(playerid, COLOR_GREY,string);
                    format(string, sizeof(string), ""COL_GREY"4. {FF6347}%s"COL_GREY"  Value[%d]  Color 1[%d]  Color 2[%d]  Locked[%d]  Impounded[%d]  Impound Price[%d]", CarInfo[carkey4][cDescription], CarInfo[carkey4][cValue], CarInfo[carkey4][cColorOne], CarInfo[carkey4][cColorTwo], CarInfo[carkey4][cLock],CarInfo[carkey4][cImpounded],CarInfo[carkey4][cImpoundedPrice]);
                    SendClientMessage(playerid, COLOR_GREY,string);
                    format(string, sizeof(string), ""COL_GREY"5. {FF6347}%s"COL_GREY"  Value[%d]  Color 1[%d]  Color 2[%d]  Locked[%d]  Impounded[%d]  Impound Price[%d]", CarInfo[carkey5][cDescription], CarInfo[carkey5][cValue], CarInfo[carkey5][cColorOne], CarInfo[carkey5][cColorTwo], CarInfo[carkey5][cLock],CarInfo[carkey5][cImpounded],CarInfo[carkey5][cImpoundedPrice]);
                    SendClientMessage(playerid, COLOR_GREY,string);
                    return 1;
                }
            }
Reply


Messages In This Thread
/v list not showing correctly - by Mikkel_RE - 06.10.2015, 17:46
Re: /v list not showing correctly - by Dusan01 - 07.10.2015, 08:53
Re: /v list not showing correctly - by Mikkel_RE - 07.10.2015, 13:43
Re: /v list not showing correctly - by Dusan01 - 07.10.2015, 15:45

Forum Jump:


Users browsing this thread: 1 Guest(s)