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; }
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; } |
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?
![]() |
¬¬ ї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..
![]() |
SetVehicleParamsEx(VehicleID,VEHICLE_PARAMS_ON, Lights, alarm, doors, bonnet, boot, objective); //Enciende el motor.
SetVehicleParamsEx(VehicleID,VEHICLE_PARAMS_OFF, Lights, alarm, doors, bonnet, boot, objective); //Apaga el motor.
SetVehicleParamsEx(VehicleID,engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective); //Enciende las luces.
SetVehicleParamsEx(VehicleID,engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective); //Apaga las luces.
PHP код:
|
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 ¬¬ ![]() |