Litle help please
#4

Doesn't works. this is my full command:

pawn Код:
COMMAND:bagagliaio(playerid, params[])
{
    new x_nr[128];
    if(sscanf(params, "s[128]", x_nr)) SendClientMessage(playerid,  COLOR_GREEN, "USA: /bagagliaio [info]");
    else
    {
        if (PlayerInfo[playerid][pPlayerLogged] == 0) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: Devi Loggarti.");
        if(strcmp(x_nr, "info", true) == 0)
        {
             new counter = 0;
             new result;
             new plyName[MAX_PLAYER_NAME];

             GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
             GiveNameSpace(plyName);
             for(new i; i != MAX_VEHICLES; i++)
             {
                new dist = CheckPlayerDistanceToVehicle(3.5, playerid, i);
                if(dist)
                {
                    result = i;
                    counter++;
                }
            }
            switch(counter)
            {
                case 0:
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Non ci sono auto con Bagagliaio intorno a te!");
                }

                case 1:
                {
                    if(IsPlayerInAnyVehicle(playerid))
                    {
                        SendClientMessage(playerid, COLOR_GREY, "  Non puoi aprire il bagagliaio mentre sei in auto");
                        return 1;
                    }
                    if(OwnableVehicleID(result))
                    {
                        if(OwnableVehicle[result] == PlayerInfo[playerid][pCarKey1]) { return 0; }
                        else if(OwnableVehicle[result] == PlayerInfo[playerid][pCarkey2]) { return 0; }
                        else if(OwnableVehicle[result] == PlayerInfo[playerid][pCarkey3]) { return 0; }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "  Bagagliaio Chiuso !");
                            return 1;
                        }
                    }
                    if(IsNotAEngineCar(result))
                    {
                        SendClientMessage(playerid, COLOR_GREY, "  Questo veicolo non ha un Bagagliaio !");
                        return 1;
                    }

                    default:
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   Ci sono troppe auto intorno");
                        return 1;
                    }
                }
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Litle help please - by TheArcher - 24.12.2010, 23:08
Respuesta: Litle help please - by admantis - 24.12.2010, 23:09
Re: Respuesta: Litle help please - by [JnA]DukeNukem - 24.12.2010, 23:10
Re: Litle help please - by TheArcher - 24.12.2010, 23:12
Re: Litle help please - by The_Gangstas - 24.12.2010, 23:16
Re: Litle help please - by TheArcher - 24.12.2010, 23:21
Re: Litle help please - by TheArcher - 24.12.2010, 23:43
Re: Litle help please - by TheArcher - 25.12.2010, 16:51
Re: Litle help please - by TheArcher - 30.12.2010, 23:13

Forum Jump:


Users browsing this thread: 2 Guest(s)