28.01.2011, 14:33
problem fixed thanks to Clive
if (strcmp("/light", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
if (IsNotAEngineCar(newcar))
{
return 1;
}
if(GetVehicleParameters(newcar, 1) == 1)
{
SetVehicleLights(newcar, 0);
GameTextForPlayer(playerid, "~w~Lights~n~~r~Off", 4000, 3);
}
else if(GetVehicleParameters(newcar, 1) == 0)
{
SetVehicleLights(newcar, 1);
GameTextForPlayer(playerid, "~w~Lights~n~~g~On", 4000, 3);
}
} else return SendClientMessage(playerid,-1,"Error: you are not in a vehicle");
}
return 1;
}