Problema con /arrancar
#1

Que cosa me falta retornar warning 209: function "cmd_arrancar" should return a value

Код:
CMD:arrancar(playerid, params[])
{
        new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
		vehicleid = GetPlayerVehicleID(playerid);

		if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"[ERROR]: No puedes usar este comando si estбs en este tipo de vehiculos.");
		GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
		if(engine == VEHICLE_PARAMS_ON)
		{
			SetVehicleEngine(vehicleid, playerid);
		}
		else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
		{
            if(LSPD_IsACopCar(vehicleid)||VIP_Car(vehicleid)||IsAHarvest(vehicleid)||VehiculoHitman(vehicleid)||IsAnSecurityCar(vehicleid)||IsATruckerCar(vehicleid)||Taxi_Vehicle(vehicleid)||AutoRusos(vehicleid)||AutoItalianos(vehicleid)||SAMD_Vehicle(vehicleid)||Mecanico_Vehicle(vehicleid)||FBI_Vehicle(vehicleid)||CNN_Vehicle(vehicleid)||IsAPizzabike(vehicleid)||LicenciaCar(vehicleid)||GobierAuto(vehicleid)||IsAnNGCar(vehicleid))
			{
				ShowInfoForPlayer(playerid, "~w~ ENCENDIENDO...", 1000);
		 		SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
			}
			else
			{
				new newcar = GetPlayerVehicleID(playerid);
            	foreach(Player, i)
	        	{
  		        	new v = GetPlayerVehicle(i, newcar);
	            	if(v != -1)
		        	{
			        	if(i == playerid)
			        	{
				       		ShowInfoForPlayer(playerid, "~w~ ENCENDIENDO...", 1000);
		 		        	SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
			        	}
		        		else if(i == Info[playerid][pVehicleKeysFrom])
						{
				        	ShowInfoForPlayer(playerid, "~w~ ENCENDIENDO...", 1000);
		 		        	SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
			        	}
			        	else
			        	{
			            	ShowInfoForPlayer(playerid, "~w~ No tienes las llaves de este vehiculo", 3000);
			        	}
			        	return 1;
		        	}
	        	}
			}
		}
 }
Gracias.
Reply
#2

pawn Код:
CMD:arrancar(playerid, params[])
{
        new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);

        if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"[ERROR]: No puedes usar este comando si estбs en este tipo de vehiculos.");
        GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine == VEHICLE_PARAMS_ON)
        {
            SetVehicleEngine(vehicleid, playerid);
        }
        else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
        {
            if(LSPD_IsACopCar(vehicleid)||VIP_Car(vehicleid)||IsAHarvest(vehicleid)||VehiculoHitman(vehicleid)||IsAnSecurityCar(vehicleid)||IsATruckerCar(vehicleid)||Taxi_Vehicle(vehicleid)||AutoRusos(vehicleid)||AutoItalianos(vehicleid)||SAMD_Vehicle(vehicleid)||Mecanico_Vehicle(vehicleid)||FBI_Vehicle(vehicleid)||CNN_Vehicle(vehicleid)||IsAPizzabike(vehicleid)||LicenciaCar(vehicleid)||GobierAuto(vehicleid)||IsAnNGCar(vehicleid))
            {
                ShowInfoForPlayer(playerid, "~w~ ENCENDIENDO...", 1000);
                SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
            }
            else
            {
                new newcar = GetPlayerVehicleID(playerid);
                foreach(Player, i)
                {
                    new v = GetPlayerVehicle(i, newcar);
                    if(v != -1)
                    {
                        if(i == playerid)
                        {
                            ShowInfoForPlayer(playerid, "~w~ ENCENDIENDO...", 1000);
                            SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
                        }
                        else if(i == Info[playerid][pVehicleKeysFrom])
                        {
                            ShowInfoForPlayer(playerid, "~w~ ENCENDIENDO...", 1000);
                            SetTimerEx("SetVehicleEngine", 1000, 0, "dd",  vehicleid, playerid);
                        }
                        else
                        {
                            ShowInfoForPlayer(playerid, "~w~ No tienes las llaves de este vehiculo", 3000);
                        }
                        return 1;
                    }
                }
            }
        }
        return 1;
       
 }
Reply
#3

Gracias
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)