їDonde estб el problema? (Ya se que son las llaves.)
#2

pawn Код:
CMD:motor(playerid, params[])
{
    new IDVEH = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    if(pInfo[playerid][pLlave1] == IDVEH)
    {
        if(Vehiculo[IDVEH][Motor] == 1)
        {
            Vehiculo[IDVEH][Motor]= 0;
            GetVehicleParamsEx(IDVEH, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(IDVEH, 0, lights, alarm, doors, bonnet, boot, objective); // ONLY the engine param was changed (to 1)
            SendClientMessage(playerid, -1, "Apagaste el motor. [Vehiculo SLOT 1]");
        }
        else if(Vehiculo[IDVEH][Motor] == 0)
        {
            Vehiculo[IDVEH][Motor] = 1;
            GetVehicleParamsEx(IDVEH, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(IDVEH, 1, lights, alarm, doors, bonnet, boot, objective); // ONLY the engine param was changed (to 1)
            SendClientMessage(playerid, -1, "Encendiste el motor.. [Vehiculo SLOT 1]");
        }
    }
    else if(pInfo[playerid][pLlave2] == IDVEH)
    {
        if(Vehiculo[IDVEH][Motor] == 1)
        {
            Vehiculo[IDVEH][Motor]= 0;
            GetVehicleParamsEx(IDVEH, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(IDVEH, 0, lights, alarm, doors, bonnet, boot, objective); // ONLY the engine param was changed (to 1)
            SendClientMessage(playerid, -1, "Apagaste el motor. [Vehiculo SLOT 2]");
        }
        else if(Vehiculo[IDVEH][Motor] == 0)
        {
            Vehiculo[IDVEH][Motor] = 1;
            GetVehicleParamsEx(IDVEH, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(IDVEH, 1, lights, alarm, doors, bonnet, boot, objective); // ONLY the engine param was changed (to 1)
            SendClientMessage(playerid, -1, "Encendiste el motor.. [Vehiculo SLOT 2]");
        }
    }
    else if(pInfo[playerid][pLlave3] == IDVEH)
    {
        if(Vehiculo[IDVEH][Motor] == 1)
        {
            Vehiculo[IDVEH][Motor]= 0;
            GetVehicleParamsEx(IDVEH, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(IDVEH, 0, lights, alarm, doors, bonnet, boot, objective); // ONLY the engine param was changed (to 1)
            SendClientMessage(playerid, -1, "Apagaste el motor. [Vehiculo SLOT 3]");
        }
        else if(Vehiculo[IDVEH][Motor] == 0)
        {
            Vehiculo[IDVEH][Motor] = 1;
            GetVehicleParamsEx(IDVEH, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(IDVEH, 1, lights, alarm, doors, bonnet, boot, objective); // ONLY the engine param was changed (to 1)
            SendClientMessage(playerid, -1, "Encendiste el motor.. [Vehiculo SLOT 3]");
        }
    }
    else
    {
        SendClientMessage(playerid,-1,"No tienes la llave del vehiculo. (Ni slot 1,2,3)");
    }
    return 1;
}
Fнjate que pusiste { y } de mбs respecto al anterior cуdigo, la prуxima mira cuando abres y cierras la condiciуn.
Reply


Messages In This Thread
їDonde estб el problema? (Ya se que son las llaves.) - by xHanks - 27.01.2014, 15:23
Re: їDonde estб el problema? (Ya se que son las llaves.) - by Whyd - 27.01.2014, 15:30

Forum Jump:


Users browsing this thread: 1 Guest(s)