[Ayuda] porfavor Ayudenme con estos comandosD:
#1

Hola SA-MP amigos, necesito ayuda de ustedes D: bueno, cree estos comandos ... y pues bueno, cuando los probe no haciendo lo que deberнan de hacer .___. їMe ayudan y me dicen porque? o si no, donde puedo conseguir esos comandos?

Код:
    if(strcmp(cmd, "/luces",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(LightsStatus[playerid] == 0)
                    {
                        LightsStatus[playerid] = 1;
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                        SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);//deja el auto con las luces encendidas, motor, etc.
                        SendClientMessage(playerid, 0xFFFFFFFF, "Encendistes Las Luces!");
                    }
                    else if(LightsStatus[playerid] == 1)
                    {
                        LightsStatus[playerid] = 0;
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                        SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, false, alarm, doors, bonnet, boot, objective);//deja el auto con las luces encendidas, motor, etc.
                        SendClientMessage(playerid, 0xFFFFFFFF, "Apagastes Las Luces!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/Alarma",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(AlarmStatus[playerid] == 0)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                        //SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON, Lights, alarm, doors, bonnet, boot, objective);//deja el auto con las luces encendidas, motor, etc.
                        AlarmStatus[playerid] = 1;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Encendistes La Alarma!");
                    }
                    else if(AlarmStatus[playerid] == 1)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        AlarmStatus[playerid] = 0;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Apagastes La Alarma!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/Capo",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(BonnetStatus[playerid] == 0)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BonnetStatus[playerid] = 1;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Abriste el Capo!");
                    }
                    else if(BonnetStatus[playerid] == 1)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BonnetStatus[playerid] = 0;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Cerraste el Capo!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/pMaletero",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(BootStatus[playerid] == 0)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                      //  SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BootStatus[playerid] = 1;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Abriste el Maletero!");
                    }
                    else if(BootStatus[playerid] == 1)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BootStatus[playerid] = 0;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Cerraste el Maletero!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
Reply
#2

Quote:
Originally Posted by Blaze_Strockovic
Посмотреть сообщение
Hola SA-MP amigos, necesito ayuda de ustedes D: bueno, cree estos comandos ... y pues bueno, cuando los probe no haciendo lo que deberнan de hacer .___. їMe ayudan y me dicen porque? o si no, donde puedo conseguir esos comandos?

Код:
    if(strcmp(cmd, "/luces",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(LightsStatus[playerid] == 0)
                    {
                        LightsStatus[playerid] = 1;
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                        SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);//deja el auto con las luces encendidas, motor, etc.
                        SendClientMessage(playerid, 0xFFFFFFFF, "Encendistes Las Luces!");
                    }
                    else if(LightsStatus[playerid] == 1)
                    {
                        LightsStatus[playerid] = 0;
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                        SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, false, alarm, doors, bonnet, boot, objective);//deja el auto con las luces encendidas, motor, etc.
                        SendClientMessage(playerid, 0xFFFFFFFF, "Apagastes Las Luces!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/Alarma",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(AlarmStatus[playerid] == 0)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                        //SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_ON, Lights, alarm, doors, bonnet, boot, objective);//deja el auto con las luces encendidas, motor, etc.
                        AlarmStatus[playerid] = 1;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Encendistes La Alarma!");
                    }
                    else if(AlarmStatus[playerid] == 1)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        AlarmStatus[playerid] = 0;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Apagastes La Alarma!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/Capo",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(BonnetStatus[playerid] == 0)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BonnetStatus[playerid] = 1;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Abriste el Capo!");
                    }
                    else if(BonnetStatus[playerid] == 1)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BonnetStatus[playerid] = 0;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Cerraste el Capo!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/pMaletero",true) == 0)
    {
        if(IsPlayerConnected(playerid))
		{
            if(IsPlayerInAnyVehicle(playerid))
            {
                new veh = GetPlayerVehicleID(playerid);
                if(veh != INVALID_VEHICLE_ID)
                {
                    if(BootStatus[playerid] == 0)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                      //  SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BootStatus[playerid] = 1;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Abriste el Maletero!");
                    }
                    else if(BootStatus[playerid] == 1)
                    {
                        new engine, Lights, alarm, doors, bonnet, boot, objective;
                        GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine, Lights, alarm, doors, bonnet, boot, objective);
                       // SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);
                        BootStatus[playerid] = 0;
                        PlayerPlaySound(playerid,1140,0.0,0.0,0.0);
                        SendClientMessage(playerid, 0xFFFFFFFF, "Cerraste el Maletero!");
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " Usted tiene que estar en un Vehiculo para utilizar este Comando !");
            }
        }
        return 1;
    }
Tu no creaste estos comandos. y que es lo que hacen mal o no hacen los comandos?
Reply
#3

Primero, Los cree yo ¬¬ Segundo, no pasa nada mal.. solo que cuando coloco el /luces o otro, todo anda normal.. pero veo que las luces no encienden quedan igual.. el LightsStatus[playerid] = 1; etc.. los tengo definido arriba de todo el GM. tercero, їVienes a Criticar o a ayudarme?
Reply
#4

Quote:
Originally Posted by Blaze_Strockovic
Посмотреть сообщение
Primero, Los cree yo ¬¬ Segundo, no pasa nada mal.. solo que cuando coloco el /luces o otro, todo anda normal.. pero veo que las luces no encienden quedan igual.. el LightsStatus[playerid] = 1; etc.. los tengo definido arriba de todo el GM. tercero, їVienes a Criticar o a ayudarme?
Los comandos no los has creado vos y no lo niegues. Si tendrнas la capacidad de crear esos comandos sabrнas el error.

// SetVehicleParamsEx(GetPlayerVehicleID(playerid),VE HICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective);

esas lineas de los comandos descomentalas. y si no tienes definido los parбmetros que estas usando en SetVehicleParamsEx definilos.
Reply
#5

¬¬ їPor crearlos yo tengo que saber el Error? DAA por eso pido ayuda, їCrees que soy pendejo? Obviamente ya intente quitando los // del SetVehicleParamsEx, pero que yo sepa la funcion del SetVehicleParamsEx hace que apage/Enciendo el motor del vehнculo, osea.. si lo coloco al poner /luces se apagara el Motor/Prendera LOL ¬¬ Piensa dios..
Reply
#6

Quote:
Originally Posted by Blaze_Strockovic
Посмотреть сообщение
¬¬ їPor crearlos yo tengo que saber el Error? DAA por eso pido ayuda, їCrees que soy pendejo? Obviamente ya intente quitando los // del SetVehicleParamsEx, pero que yo sepa la funcion del SetVehicleParamsEx hace que apage/Enciendo el motor del vehнculo, osea.. si lo coloco al poner /luces se apagara el Motor/Prendera LOL ¬¬ Piensa dios..
Si sos un pendejo n00b que viene a joder creerse el saber por dios. no te ayudare mas pero solo te dire algo.

1_ No vengas diciendo cree estos comandos ya que se ven avanzado y el error no es grave ni dificil ya todos sabemos que vos no creaste esos comandos
2_ Afirmas todo muy seguro, porque mejor no lees wiki samp
3_ SetVehicleParamsEx hace muchas cosas dependiendo del valor que le des a sus parametros obviamente que si le das 1 al parametro que corresponde a prender la luz la prende con 1 y se apaga con 0

PD: Si alguien quiere que te ayude otro ayudo a personas serias en si no se mucho pero mas que vos lo puedo asegurar
Reply
#7

PHP код:
SetVehicleParamsEx(VehicleID,VEHICLE_PARAMS_ONLightsalarmdoorsbonnetbootobjective); //Enciende el motor.
SetVehicleParamsEx(VehicleID,VEHICLE_PARAMS_OFFLightsalarmdoorsbonnetbootobjective); //Apaga el motor.
SetVehicleParamsEx(VehicleID,engineVEHICLE_PARAMS_ONalarmdoorsbonnetbootobjective); //Enciende las luces.
SetVehicleParamsEx(VehicleID,engineVEHICLE_PARAMS_OFFalarmdoorsbonnetbootobjective); //Apaga las luces. 
Eso es un ejemplo, йchale un vistazo al archivo llamado VehicleUtil.inc que encuentras en: ' Carpeta Raiz -> Include '.
PD @EDIT: Conectate al msn.
Reply
#8

-Mensaje Fail-
Reply
#9

Joder que e hecho, Joder.. vengo es a pedir AYUDA SOY NUEVO EN ESTO DE SCRIPT ESE SCRIPT LO CREE PORQUE ME GUIEE CON UNO IGUAL ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬

Quote:
Originally Posted by WCrimson
Посмотреть сообщение
PHP код:
SetVehicleParamsEx(VehicleID,VEHICLE_PARAMS_ONLightsalarmdoorsbonnetbootobjective); //Enciende el motor.
SetVehicleParamsEx(VehicleID,VEHICLE_PARAMS_OFFLightsalarmdoorsbonnetbootobjective); //Apaga el motor.
SetVehicleParamsEx(VehicleID,engineVEHICLE_PARAMS_ONalarmdoorsbonnetbootobjective); //Enciende las luces.
SetVehicleParamsEx(VehicleID,engineVEHICLE_PARAMS_OFFalarmdoorsbonnetbootobjective); //Apaga las luces. 
Mmmmmm ya entendi, veamos probare... PD:alfin alguien que me ayuda amigablemente y sin criticar si soy buen o mal scripter ¬¬
Reply
#10

Quote:
Originally Posted by Blaze_Strockovic
Посмотреть сообщение
Joder que e hecho, Joder.. vengo es a pedir AYUDA SOY NUEVO EN ESTO DE SCRIPT ESE SCRIPT LO CREE PORQUE ME GUIEE CON UNO IGUAL ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬



Mmmmmm ya entendi, veamos probare... PD:alfin alguien que me ayuda amigablemente y sin criticar si soy buen o mal scripter ¬¬
Claro, asн ayudo a todos los que no mienten y arman bardo.
Admite que no era como decнas vos? que piense yo? para que si se que te equivocaste al decir que solo era para prender y apagar el motor en fin no seguirй desviando el tema.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)