/lights /alarm /bonnet /lock and /boot all not working
#1

What's wrong with these commands?
They don't work at all

Код:
CMD:lights(playerid, params[])
{
    if(auth[playerid] == 0){ return Kick(playerid); }
	if(IsPlayerInAnyVehicle(playerid))
	{
	    if(GetPlayerVehicleSeat(playerid) == 0)
	    {
	        new vehicleid = GetPlayerVehicleID(playerid);
	        new engine, lights, alarm, doors, bonnet, boot, objective;
			GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

			if(lights == 0){
				SetVehicleParamsEx(vehicleid, engine, 1, alarm, doors, bonnet, boot, objective);
			}
			else if(lights == 1){
			    SetVehicleParamsEx(vehicleid, engine, 0, alarm, doors, bonnet, boot, objective);
			}
	    }
	    else return SendClientMessage(playerid, -1, "{B2BEB5}Only the driver of the vehicle can use this command.");
	}
	else return SendClientMessage(playerid, -1, "{B2BEB5}You are not in a vehicle.");
    return 1;
}

CMD:alarm(playerid, params[])
{
    if(auth[playerid] == 0){ return Kick(playerid); }
	if(IsPlayerInAnyVehicle(playerid))
	{
	    if(GetPlayerVehicleSeat(playerid) == 0)
	    {
	        new vehicleid = GetPlayerVehicleID(playerid);
	        new engine, lights, alarm, doors, bonnet, boot, objective;
			GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

			if(alarm == 0){
				SetVehicleParamsEx(vehicleid, engine, lights, 1, doors, bonnet, boot, objective);
			}
			else if(alarm == 1){
			    SetVehicleParamsEx(vehicleid, engine, lights, 0, doors, bonnet, boot, objective);
			}
	    }
	    else return SendClientMessage(playerid, -1, "{B2BEB5}Only the driver of the vehicle can use this command.");
	}
	else return SendClientMessage(playerid, -1, "{B2BEB5}You are not in a vehicle.");
    return 1;
}

CMD:bonnet(playerid, params[])
{
    if(auth[playerid] == 0){ return Kick(playerid); }
	if(IsPlayerInAnyVehicle(playerid))
	{
	    if(GetPlayerVehicleSeat(playerid) == 0)
	    {
	        new vehicleid = GetPlayerVehicleID(playerid);
	        new engine, lights, alarm, doors, bonnet, boot, objective;
			GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

			if(bonnet == 0){
				SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, 1, boot, objective);
			}
			else if(bonnet == 1){
			    SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, 0, boot, objective);
			}
	    }
	    else return SendClientMessage(playerid, -1, "{B2BEB5}Only the driver of the vehicle can use this command.");
	}
	else return SendClientMessage(playerid, -1, "{B2BEB5}You are not in a vehicle.");
    return 1;
}

CMD:boot(playerid, params[])
{
    if(auth[playerid] == 0){ return Kick(playerid); }
	if(IsPlayerInAnyVehicle(playerid))
	{
	    if(GetPlayerVehicleSeat(playerid) == 0)
	    {
	        new vehicleid = GetPlayerVehicleID(playerid);
	        new engine, lights, alarm, doors, bonnet, boot, objective;
			GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

			if(boot == 0){
				SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, 1, objective);
			}
			else if(boot == 1){
			    SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, 0, objective);
			}
	    }
	    else return SendClientMessage(playerid, -1, "{B2BEB5}Only the driver of the vehicle can use this command.");
	}
	else return SendClientMessage(playerid, -1, "{B2BEB5}You are not in a vehicle.");
    return 1;
}

CMD:lock(playerid, params[])
{
    if(auth[playerid] == 0){ return Kick(playerid); }
	if(IsPlayerInAnyVehicle(playerid))
	{
	    if(GetPlayerVehicleSeat(playerid) == 0)
	    {
	        new vehicleid = GetPlayerVehicleID(playerid);
	        new engine, lights, alarm, doors, bonnet, boot, objective;
			GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

			if(doors == 0){
				SetVehicleParamsEx(vehicleid, engine, lights, alarm, 1, bonnet, boot, objective);
				SendClientMessage(playerid, -1, "{77DD77}Your vehicle doors have been {FF6961}locked{77DD77}.");
			}
			else if(doors == 1){
			    SetVehicleParamsEx(vehicleid, engine, lights, alarm, 0, bonnet, boot, objective);
			    SendClientMessage(playerid, -1, "{77DD77}Your vehicle doors have been {006600}unlocked{77DD77}.");
			}
	    }
	    else return SendClientMessage(playerid, -1, "{B2BEB5}Only the driver of the vehicle can use this command.");
	}
	else return SendClientMessage(playerid, -1, "{B2BEB5}You are not in a vehicle.");
    return 1;
}
Reply


Messages In This Thread
/lights /alarm /bonnet /lock and /boot all not working - by Sellize - 08.03.2015, 08:34
Re: /lights /alarm /bonnet /lock and /boot all not working - by Evocator - 08.03.2015, 08:44
Re: /lights /alarm /bonnet /lock and /boot all not working - by biker122 - 08.03.2015, 08:45

Forum Jump:


Users browsing this thread: 3 Guest(s)